nateraw / modelcards

📝 Utility to create, edit, and publish model cards on the Hugging Face Hub. [**Now lives in huggingface_hub**]
MIT License
15 stars 4 forks source link

Add modelcard validation by hitting hub endpoint #35

Closed nateraw closed 2 years ago

nateraw commented 2 years ago

This PR resolves #2 by adding a call to the Hugging Face API to validate card metadata before pushing to the hub. Since it requires the internet, we only call it when pushing to hub, as we can assume the user has access to the internet.

coyotte508 commented 2 years ago

Note that the hub will reject a push with an invalid model card only if the model card is changed during the push.

So, a user can have an invalid card already and push other files without issues.