MCPcopy
hub / github.com/huggingface/transformers / require_kernels

Function require_kernels

src/transformers/testing_utils.py:690–697  ·  view source on GitHub ↗

Decorator marking a test that requires the kernels library. These tests are skipped when the kernels library isn't installed.

(test_case)

Source from the content-addressed store, hash-verified

688
689
690def require_kernels(test_case):
691 """
692 Decorator marking a test that requires the kernels library.
693
694 These tests are skipped when the kernels library isn't installed.
695
696 """
697 return unittest.skipUnless(is_kernels_available(), "test requires the kernels library")(test_case)
698
699
700def require_flash_attn_3(test_case):

Callers

nothing calls this directly

Calls 1

is_kernels_availableFunction · 0.85

Tested by

no test coverage detected