Skip to content

Commit

Permalink
Fix 2609 - Import packaging by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Oct 16, 2024
1 parent 9bb6bd6 commit b3ceb9d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/huggingface_hub/hub_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
Union,
)

import packaging.version

from . import constants
from .errors import EntryNotFoundError, HfHubHTTPError
from .file_download import hf_hub_download
Expand All @@ -41,7 +43,6 @@
import torch # type: ignore

if is_safetensors_available():
import packaging.version
import safetensors
from safetensors.torch import load_model as load_model_as_safetensor
from safetensors.torch import save_model as save_model_as_safetensor
Expand Down

0 comments on commit b3ceb9d

Please sign in to comment.