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 #384

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

While I was messing around with dependency versions to fix a security check, I noticed that Garden's tests fail on new versions of the Globus SDK. I cut a ticket for this: https://github.com/Garden-AI/garden/issues/385 That's the reason for the new max globus-sdk version number in this PR.

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--384.org.readthedocs.build/en/384/

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 (aaddb30) 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 #384 +/- ## ========================================== - 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.