MCPcopy Index your code
hub / github.com/huggingface/diffusers / decorator

Function decorator

tests/testing_utils.py:509–514  ·  view source on GitHub ↗
(test_case)

Source from the content-addressed store, hash-verified

507 """Decorator marking a test that requires torch with a specific version or greater."""
508
509 def decorator(test_case):
510 correct_torch_version = is_torch_available() and is_torch_version(">=", torch_version)
511 return pytest.mark.skipif(
512 not correct_torch_version,
513 reason=f"test requires torch with the version greater than or equal to {torch_version}",
514 )(test_case)
515
516 return decorator
517

Callers

nothing calls this directly

Calls 11

is_torch_availableFunction · 0.90
is_torch_versionFunction · 0.90
is_peft_availableFunction · 0.90
is_accelerate_availableFunction · 0.90
is_gguf_availableFunction · 0.90
is_torchao_availableFunction · 0.90
is_kernels_availableFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…