Skip to main content

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.

Generated model card image

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 versions of pip starting with 20.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 proto file
mct.update_model_card(model_card)

# Return the model card document as an HTML page
html = mct.export_format()

Model Card Generation on TFX

If you are using TensorFlow Extended (TFX), you can incorporate model card generation into your TFX pipeline via the ModelCardGenerator component. See our guide for more details, this case study for a demonstration.

Schema

Model cards are stored in proto as an intermediate format. You can see the model card JSON schema in the schema directory.

References

[1] https://arxiv.org/abs/1810.03993

Metadata

Release files for model-card-toolkit 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for model-card-toolkit 1.3.1
File Size Uploaded Provenance Actions
model-card-toolkit-1.3.1.tar.gz 57.5 kB Without provenance Details for model-card-toolkit-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for model-card-toolkit 1.3.1
File Interpreter ABI Platform Actions
model_card_toolkit-1.3.1-py3-none-any.whl Python 3 none any Details for model_card_toolkit-1.3.1-py3-none-any.whl

Total release size: 137.1 kB

Release files / model-card-toolkit-1.3.1.tar.gz

Download URL model-card-toolkit-1.3.1.tar.gz
Size 57.5 kB
Tags Source
SHA-256 checksum
How to use checksums
37c9503c763daa9e294ed677cde42febdc3713d6c621c3bc6d902077b122a2d2
BLAKE2b-256 checksum
How to use checksums
2f29b8d031d591e8cbf45a98924f56f32e21ff7096a98d42a9bcb4b7a9e4c0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.9

Release files / model_card_toolkit-1.3.1-py3-none-any.whl

Download URL model_card_toolkit-1.3.1-py3-none-any.whl
Size 79.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4f3018d88945b8813beaec7ac413c88b08dd1de1da072bb237ce75c0bcb381
BLAKE2b-256 checksum
How to use checksums
31aa312acaeb9c0c8230a51477448add371debdd19c8962da2d026d962ef3a0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.9

Security for model-card-toolkit 1.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page