Skip to content

Commit

Permalink
fix importguard
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkho committed Dec 12, 2024
1 parent b9f7303 commit 6f64f52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion torchtune/utils/_import_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
)

_TORCHDATA_MIN_VERSION = "0.10.0"
if importlib.util.find_spec("torchdata.nodes") is not None:
if (
importlib.util.find_spec("torchdata") is not None
and importlib.util.find_spec("torchdata.nodes") is not None
):
_TORCHDATA_INSTALLED = True
else:
_TORCHDATA_INSTALLED = False

0 comments on commit 6f64f52

Please sign in to comment.