Skip to content

Commit

Permalink
Modify codecov concurrency mode from threading to multiprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
SolenoidWGT committed Jan 13, 2023
1 parent a334a0c commit 906e0c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[run]
concurrency = multiprocessing,thread
omit =
ding/utils/slurm_helper.py
ding/utils/file_helper.py
Expand Down
6 changes: 6 additions & 0 deletions ding/framework/middleware/tests/test_barrier.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,23 @@ def test_star_topology_barrier():
ctx = mp.get_context("spawn")
with ctx.Pool(processes=4) as pool:
pool.map(launch_barrier, [[i, 'star', star_barrier, 0] for i in range(4)])
pool.close()
pool.join()


@pytest.mark.unittest
def test_mesh_topology_barrier():
ctx = mp.get_context("spawn")
with ctx.Pool(processes=4) as pool:
pool.map(launch_barrier, [[i, 'mesh', mesh_barrier, 1] for i in range(4)])
pool.close()
pool.join()


@pytest.mark.unittest
def test_unmatch_barrier():
ctx = mp.get_context("spawn")
with ctx.Pool(processes=4) as pool:
pool.map(launch_barrier, [[i, 'mesh', unmatch_barrier, 2] for i in range(4)])
pool.close()
pool.join()

0 comments on commit 906e0c0

Please sign in to comment.