Skip to content

Commit

Permalink
Remove unnecessary statements
Browse files Browse the repository at this point in the history
  • Loading branch information
aoyulong committed Dec 1, 2021
1 parent 35828dd commit 8d4199c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions python/paddle/distributed/auto_parallel/parallelizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import paddle
from paddle.distributed.utils import get_logger
from paddle.distributed.fleet import cloud_utils
from paddle.distributed.fleet.launch_utils import run_with_coverage
import paddle.fluid.core as core
from .dist_context import DistributedContext
from .dist_context import get_default_distributed_context
Expand Down Expand Up @@ -139,7 +138,6 @@ def parallelize(self,
rank_mapping_args = " ".join(
["--rank_mapping_path", rank_mapping_path])
if os.environ.get("WITH_COVERAGE", "OFF") == "ON":
run_with_coverage(True)
coverage_args = ["-m", "coverage", "run", "--branch", "-p"]
else:
coverage_args = []
Expand Down
3 changes: 2 additions & 1 deletion python/paddle/distributed/fleet/launch_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ def start_local_trainers(cluster,
current_env.update(proc_env)

coverage_args = []
if run_with_coverage():
if run_with_coverage() or os.environ.get("WITH_COVERAGE",
"OFF") == "ON":
coverage_args = ["-m", "coverage", "run", "--branch", "-p"]
cmd = [sys.executable, "-u"] + coverage_args + [training_script
] + training_script_args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py")
# string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(WITH_DISTRIBUTE AND WITH_GPU AND WITH_NCCL)
list(APPEND DIST_TEST_OPS test_auto_parallel_launch)
list(APPEND DIST_TEST_OPS test_auto_parallel_relaunch)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def test_relaunch(self):
"auto_parallel_relaunch_model.py")

if os.environ.get("WITH_COVERAGE", "OFF") == "ON":
run_with_coverage(True)
coverage_args = ["-m", "coverage", "run", "--branch", "-p"]
else:
coverage_args = []
Expand Down

0 comments on commit 8d4199c

Please sign in to comment.