Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

A toolkit that streamlines and automates the generation of model cards

License

NotificationsYou must be signed in to change notification settings

tensorflow/model-card-toolkit

CIPyPIDocumentation

The Model Card Toolkit (MCT) streamlines and automates generation ofModel Cards [1], machine learning documentsthat provide context and transparency into a model's development and performance.Integrating the MCT into your ML pipeline enables you to share model metadata andmetrics 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 onPyPI,and requires Python 3.7 or later.

Installing the basic, framework agnostic package:

pip install model-card-toolkit

If you are generating model cards for TensorFlow models, install the optionalTensorFlow dependencies to use Model Card Toolkit's TensorFlow utilities:

pip install model-card-toolkit[tensorflow]

You may need to append the--use-deprecated=legacy-resolver flag when runningversions of pip starting with 20.3.

Seethe installation guidefor more installation options.

Getting Started

import model_card_toolkit as mct# Initialize the Model Card Toolkit with a path to store generate assetsmodel_card_output_path = ...toolkit = mct.ModelCardToolkit(model_card_output_path)# Initialize the ModelCard, which can be freely populatedmodel_card = toolkit.scaffold_assets()model_card.model_details.name = 'My Model'# Write the model card data to a proto filetoolkit.update_model_card(model_card)# Return the model card document as an HTML pagehtml = toolkit.export_format()

Model Card Generation on TFX

If you are usingTensorFlow Extended (TFX), you canincorporate model card generation into your TFX pipeline via theModelCardGeneratorcomponent.

TheModelCardGenerator component has moved to theTFX Addons library and is no longerpackaged in Model Card Toolkit from version 2.0.0. Before you can use thecomponent, you will need to install thetfx-addons package:

pip install tfx-addons[model_card_generator]

See theModelCardGenerator guideand run thecase study notebookto learn more about the component.

Schema

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

References

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


[8]ページ先頭

©2009-2025 Movatter.jp