Skip to main content

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.

Generated model card image

Installation

The Model Card Toolkit is hosted on PyPI, and can be installed with pip install model-card-toolkit.

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

model-card-toolkit-0.1.1.tar.gz (25.8 kB view details)

Uploaded Source

Built Distribution

model_card_toolkit-0.1.1-py3-none-any.whl (38.1 kB view details)

Uploaded Python 3

File details

Details for the file model-card-toolkit-0.1.1.tar.gz.

File metadata

  • Download URL: model-card-toolkit-0.1.1.tar.gz
  • Upload date:
  • Size: 25.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for model-card-toolkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8254d8d884319b9c037e04d7a8454c81f88617b88690cc308f6b41a17860e662
MD5 49ebc96fde947b8a78cc57aef8fab184
BLAKE2b-256 13e80fe7ff8335fd3f32a51eb413b3dac9027750be6d429a5317e8e33afbf228

See more details on using hashes here.

File details

Details for the file model_card_toolkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: model_card_toolkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for model_card_toolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ab6deab3a7ebab756cdde2789607f70fa810d187dda15d77c96900e82545079c
MD5 a0501375348626e359f76fb8590356dd
BLAKE2b-256 7ec5b4be8ffdab278af69668ab2fa8a580bad8157cd2920687bc10615d841a38

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page