Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update torch version to 1.10.X for SparseML #815

Merged
merged 4 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pl_bolts/callbacks/sparseml.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, recipe_path: str):
if not _PL_GREATER_EQUAL_1_4_5:
raise MisconfigurationException("SparseML requires PyTorch Lightning 1.4.5 or greater.")
if not _TORCH_MAX_VERSION_SPARSEML:
raise MisconfigurationException("SparseML requires PyTorch version lower than 1.10.0.")
raise MisconfigurationException("SparseML requires PyTorch version lower than 1.11.0.")
raise MisconfigurationException("SparseML has not be installed, install with pip install sparseml")
self.manager = ScheduledModifierManager.from_yaml(recipe_path)

Expand Down
2 changes: 1 addition & 1 deletion pl_bolts/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _compare_version(package: str, op: Callable, version: str) -> bool:
_PL_GREATER_EQUAL_1_4 = _compare_version("pytorch_lightning", operator.ge, "1.4.0")
_PL_GREATER_EQUAL_1_4_5 = _compare_version("pytorch_lightning", operator.ge, "1.4.5")
_TORCH_ORT_AVAILABLE = _module_available("torch_ort")
_TORCH_MAX_VERSION_SPARSEML = _compare_version("torch", operator.lt, "1.10.0")
_TORCH_MAX_VERSION_SPARSEML = _compare_version("torch", operator.lt, "1.11.0")
_SPARSEML_AVAILABLE = _module_available("sparseml") and _PL_GREATER_EQUAL_1_4_5 and _TORCH_MAX_VERSION_SPARSEML

__all__ = ["BatchGradientVerification"]