Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
17 stars 4 forks source link

Gracefully handle a Hugging Face repo not having a README #378

Closed WillEngler closed 8 months ago

WillEngler commented 8 months ago

Fixes #377

Overview

The huggingface_hub library assumes all repos have a README.md. So the expression ModelCard.load(repo_id) will raise an error if README.md is not in a repo's root.

Discussion

n/a

Testing

I made willengler-uc/empty-model-repo to repro and test. I confirmed that on main I get the error and on my branch we don't.

Documentation

n/a


📚 Documentation preview 📚: https://garden-ai--378.org.readthedocs.build/en/378/

codecov-commenter commented 8 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (162fbf7) 75.80% compared to head (5f3f09d) 75.69%.

Files Patch % Lines
garden_ai/model_connectors/hugging_face.py 42.85% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #378 +/- ## ========================================== - Coverage 75.80% 75.69% -0.11% ========================================== Files 42 42 Lines 2426 2432 +6 ========================================== + Hits 1839 1841 +2 - Misses 587 591 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

WillEngler commented 8 months ago

Closing in favor of https://github.com/Garden-AI/garden/pull/384