Model Card Toolkit
Project description
Model Card Toolkit
The Model Card Toolkit (MCT) streamlines and automates generation of Model Cards [1], machine learning documents that provide context and transparency into a model's development and performance. Integrating the MCT into your ML pipeline enables the sharing model metadata and metrics with researchers, developers, reporters, and more.
Some use cases of model cards include:
- Facilitating the exchange of information between model builders and product developers.
- Informing users of ML models to make better-informed decisions about how to use them (or how not to use them).
- Providing model information required for effective public oversight and accountability.
Installation
The Model Card Toolkit is hosted on PyPI, and can be installed with pip install model-card-toolkit
(or pip install model-card-toolkit --use-deprecated=legacy-resolver
for pip20.3). See the installation guide for more details.
Getting Started
import model_card_toolkit
# Initialize the Model Card Toolkit with a path to store generate assets
model_card_output_path = ...
mct = model_card_toolkit.ModelCardToolkit(model_card_output_path)
# Initialize the model_card_toolkit.ModelCard, which can be freely populated
model_card = mct.scaffold_assets()
model_card.model_details.name = 'My Model'
# Write the model card data to a JSON file
mct.update_model_card_json(model_card)
# Return the model card document as an HTML page
html = mct.export_format()
Automatic Model Card Generation
If your machine learning pipeline uses the TensorFlow Extended (TFX) platform or ML Metadata, you can automate model card generation. See this demo notebook for a demonstration of how to integrate the MCT into your pipeline.
Schema
Model cards are stored in JSON as an intermediate format. You can see the model card JSON schema in the schema
directory. Note that this is not a finalized path and may be hosted elsewhere in the future.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file model-card-toolkit-0.1.3.tar.gz
.
File metadata
- Download URL: model-card-toolkit-0.1.3.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 398a9f4586afd2ce594237060b15ba6ca1560718cfb6ca6d578c5e5a5a1d8d21 |
|
MD5 | abb8912bf741c78fe2e18b5d45e1eaa2 |
|
BLAKE2b-256 | 3eeacc18930d6f3bc7d73c8bef5022a6310f80956cff0f8f93dc8a14ebb3ca50 |
File details
Details for the file model_card_toolkit-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: model_card_toolkit-0.1.3-py3-none-any.whl
- Upload date:
- Size: 44.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d635384b129d45d79ddfbbdd35311ebd179a6f3bfbea9832493d6bb6f3e7eca |
|
MD5 | 36bb80650f54bc03b5527984d11da799 |
|
BLAKE2b-256 | 223b71d18eb282998d44f62b565340d264cd2b81cf52ce6d41448d21753d61cc |