GithubHelp home page GithubHelp logo

chenxingqiang / model-card-toolkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tensorflow/model-card-toolkit

0.0 0.0 0.0 9.19 MB

A toolkit that streamlines and automates the generation of model cards

Home Page: https://www.tensorflow.org/responsible_ai/model_card_toolkit/guide

License: Apache License 2.0

Shell 0.95% Python 90.38% Starlark 1.56% Jinja 7.11%

model-card-toolkit's Introduction

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.

The ModelCardGenerator component is moving to the TFX Addons library and will no longer be packaged in Model Card Toolkit from version 2.0.0. Before you can use the component, you will need to install the tfx-addons package:

pip install tfx-addons[model_card_generator]

This page will be updated to include the new links for the Model Cards in TFX guide and the end-to-end demo when the migration is completed.

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

model-card-toolkit's People

Contributors

shuklak13 avatar codesue avatar calvinleungyk avatar fhuanming avatar hughmiao avatar manivaradarajan avatar casassg avatar rchen152 avatar alanschiemenz avatar embr avatar hanneshapke avatar kweinmeister avatar sanatmpa1 avatar yashk2810 avatar yilei avatar sklin93 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.