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

Method __call__

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

Source from the content-addressed store, hash-verified

497 self._current_test(**fixture_kwargs)
498
499 def __call__(self, request):
500 self._current_test = self._get_current_test_func(request)
501 self._fixture_kwargs = self._get_fixture_kwargs(request, self._current_test)
502
503 if self.requires_cuda_env and not get_accelerator().is_available():
504 pytest.skip("only supported in accelerator environments.")
505
506 # Catch world_size override pytest mark
507 for mark in getattr(request.function, "pytestmark", []):
508 if mark.name == "world_size":
509 world_size = mark.args[0]
510 break
511 else:
512 world_size = self._fixture_kwargs.get("world_size", self.world_size)
513
514 self._launch_with_file_store(request, world_size)
515
516 def _get_current_test_func(self, request):
517 # 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