Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
160
def
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_greater_or_equal
Function · 0.85
is_torch_less_or_equal
Function · 0.85
is_torch_mps_available
Function · 0.85
is_torch_xpu_available
Function · 0.85
enable_tf32
Function · 0.85
is_torch_flex_attn_available
Function · 0.85
is_grouped_mm_available
Function · 0.85
is_fsdp_available
Function · 0.85
get_torch_major_and_minor_version
Function · 0.85
http_user_agent
Function · 0.85
__init__
Method · 0.85
Calls
1
_is_package_available
Function · 0.85
Tested by
no test coverage detected