MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / __call__

Method __call__

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

Source from the content-addressed store, hash-verified

484 self._current_test(**fixture_kwargs)
485
486 def __call__(self, request):
487 self._current_test = self._get_current_test_func(request)
488 self._fixture_kwargs = self._get_fixture_kwargs(request, self._current_test)
489
490 if self.requires_cuda_env and not get_accelerator().is_available():
491 pytest.skip("only supported in accelerator environments.")
492
493 # Catch world_size override pytest mark
494 for mark in getattr(request.function, "pytestmark", []):
495 if mark.name == "world_size":
496 world_size = mark.args[0]
497 break
498 else:
499 world_size = self._fixture_kwargs.get("world_size", self.world_size)
500
501 self._launch_with_file_store(request, world_size)
502
503 def _get_current_test_func(self, request):
504 # 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