MCPcopy Create free account
hub / github.com/modelscope/modelscope / require_torch

Function require_torch

modelscope/utils/test_utils.py:62–65  ·  view source on GitHub ↗
(test_case)

Source from the content-addressed store, hash-verified

60
61
62def require_torch(test_case):
63 if not is_torch_available():
64 test_case = unittest.skip('test requires PyTorch')(test_case)
65 return test_case
66
67
68def set_test_level(level: int):

Callers

nothing calls this directly

Calls 1

is_torch_availableFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…