Adds a method for rendering model cards. This allows you to render a model card by calling model_card.render() without first having to first create a ModelCardToolkit object and scaffold assets (which copies default template files and creates a model card proto). Additionally, saving the rendered model card document to a file is optional with this method.
What does this pull request do?
Adds a method for rendering model cards. This allows you to render a model card by calling
model_card.render()
without first having to first create aModelCardToolkit
object and scaffold assets (which copies default template files and creates a model card proto). Additionally, saving the rendered model card document to a file is optional with this method.Current usage:
With this change:
Relates to https://github.com/tensorflow/model-card-toolkit/discussions/276.
How did you test this change?
Added unit tests and ran
pytest model_card_toolkit
. Example notebook: https://colab.research.google.com/gist/codesue/e315e2d79d564ed60a454b8509ca3c31/dev.ipynbHow did you document this change?
Docstrings
Before submitting
Before submitting a pull request, please be sure to do the following: