MCPcopy
hub / github.com/deepspeedai/DeepSpeed / _close_pool

Method _close_pool

tests/unit/common.py:358–362  ·  view source on GitHub ↗
(self, pool, num_procs, force=False)

Source from the content-addressed store, hash-verified

356 dist.destroy_process_group()
357
358 def _close_pool(self, pool, num_procs, force=False):
359 if force or not self.reuse_dist_env:
360 pool.starmap(self._dist_destroy, [() for _ in range(num_procs)])
361 pool.close()
362 pool.join()
363
364
365class DistributedFixture(DistributedExec):

Callers 2

pytest_runtest_teardownFunction · 0.80

Calls 1

closeMethod · 0.45

Tested by 1

pytest_runtest_teardownFunction · 0.64