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

Define cache errors in errors.py #2470

Merged
merged 2 commits into from
Aug 21, 2024
Merged

Conversation

010kim
Copy link
Contributor

@010kim 010kim commented Aug 21, 2024

Below is the list of descriptions for this PR.

  1. Defined two errors (CacheNotFound, CorruptedCacheExcpetion) in errors.py
  • imported typing and pathlib package to keep the original definition of CacheNotFound
  1. Adjusted the import paths in init.py

  2. Removed the original definitions of the errors in _cache_manager.py

  • added "from huggingface_hub.errors import CacheNotFound, CorruptedCacheException" for API support
  1. Passed Ruff check

#2069

Duplicate on #2456

@010kim
Copy link
Contributor Author

010kim commented Aug 21, 2024

@Wauplin Apologies for duplicate work! I closed the previous PR just to be careful. I saw someone was working on the _cache_manager.py file. This time I made sure the updates pass the ruff check.

@010kim 010kim marked this pull request as ready for review August 21, 2024 05:49
@Wauplin
Copy link
Contributor

Wauplin commented Aug 21, 2024

Thanks for taking care of the styling! It's usually possible to "update branch" and resolve the conflicts. But otherwise doing like you did is ok as well. I'm waiting for the CI to pass and we should be good :)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor

Wauplin commented Aug 21, 2024

Failing test is unrelated to it's time to merge! Congrats @010kim for your first contribution! 🎉

@Wauplin Wauplin merged commit 7717dec into huggingface:main Aug 21, 2024
9 of 14 checks passed
@010kim
Copy link
Contributor Author

010kim commented Aug 22, 2024

Thank you so much!!

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.

3 participants