Adds support for saving and loading model cards. Supported save formats are JSON and protobuf.
Saving a model card:
import model_card_toolkit as mct
model_card = mct.ModelCard()
model_card.model_details.name = 'Fine-tuned MobileNetV2 Model for Cats vs. Dogs'
model_card.save('model_cards/cats_vs_dogs.json')
Loading a model card:
import model_card_toolkit as mct
model_card = mct.load_model_card('model_cards/cats_vs_dogs.json')
model_card.model_details.licenses.append(mct.License(identifier='Apache-2.0'))
An alternative would be to take a dir path and pass e.g. save_format as keras does, but there's only one file output and this way gives more control over the file name.
Fixes #109 and relates to #276.
How did you test this change?
Updated tests and ran pytest model_card_toolkit.
How did you document this change?
Docstrings and updated the Concepts guide.
Before submitting
Before submitting a pull request, please be sure to do the following:
What does this pull request do?
Adds support for saving and loading model cards. Supported save formats are JSON and protobuf.
Saving a model card:
Loading a model card:
An alternative would be to take a dir path and pass e.g.
save_format
as keras does, but there's only one file output and this way gives more control over the file name.Fixes #109 and relates to #276.
How did you test this change?
Updated tests and ran
pytest model_card_toolkit
.How did you document this change?
Docstrings and updated the Concepts guide.
Before submitting
Before submitting a pull request, please be sure to do the following: