torch_version_ge¶
- torchtune.utils.torch_version_ge(version: str) bool [source]¶
Check if torch version is greater than or equal to the given version.
- Parameters:
version (str) – The torch version to compare against
- Returns:
True if torch version is greater than or equal to the given version.
- Return type:
Example
>>> print(torch.__version__) 2.4.0 >>> torch_version_ge("2.0") True