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

Method __call__

tests/unit/common.py:483–498  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

481 self._current_test(**fixture_kwargs)
482
483 def __call__(self, request):
484 self._current_test = self._get_current_test_func(request)
485 self._fixture_kwargs = self._get_fixture_kwargs(request, self._current_test)
486
487 if self.requires_cuda_env and not get_accelerator().is_available():
488 pytest.skip("only supported in accelerator environments.")
489
490 # Catch world_size override pytest mark
491 for mark in getattr(request.function, "pytestmark", []):
492 if mark.name == "world_size":
493 world_size = mark.args[0]
494 break
495 else:
496 world_size = self._fixture_kwargs.get("world_size", self.world_size)
497
498 self._launch_with_file_store(request, world_size)
499
500 def _get_current_test_func(self, request):
501 # DistributedTest subclasses may have multiple test methods

Callers

nothing calls this directly

Calls 6

get_acceleratorFunction · 0.90
_get_fixture_kwargsMethod · 0.80
is_availableMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected