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

Function get_torch_version

src/transformers/utils/import_utils.py:160–162  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

158
159@lru_cache
160def get_torch_version() -> str:
161 _, torch_version = _is_package_available("torch", return_version=True)
162 return torch_version
163
164
165@lru_cache

Callers 11

is_torch_less_or_equalFunction · 0.85
is_torch_mps_availableFunction · 0.85
is_torch_xpu_availableFunction · 0.85
enable_tf32Function · 0.85
is_grouped_mm_availableFunction · 0.85
is_fsdp_availableFunction · 0.85
http_user_agentFunction · 0.85
__init__Method · 0.85

Calls 1

_is_package_availableFunction · 0.85

Tested by

no test coverage detected