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

Don't use private exception class (not in latest huggingface_hub) #990

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

awni
Copy link
Member

@awni awni commented Sep 17, 2024

Closes #988

Copy link
Collaborator

@barronalex barronalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@awni awni merged commit f530f56 into main Sep 17, 2024
2 checks passed
@awni awni deleted the internal_hf_error branch September 17, 2024 23:22
@@ -14,7 +14,6 @@
import mlx.core as mx
import mlx.nn as nn
from huggingface_hub import snapshot_download
from huggingface_hub.utils._errors import RepositoryNotFoundError

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not private, you can import it using :

from huggingface_hub.errors import RepositoryNotFoundError

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well either way it's not in the latest hugging_face hub so we shouldn't use it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No , it is . all exceptions are defined in huggingface_hub.errors in the latest huggingface_hub release.

The huggingface_hub.utils._errors module was deleted in this PR to avoid confusion.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.. I missed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

huggingface_hub 0.25 causes error upon importing from mlx_lm
3 participants