model-card-toolkit


Namemodel-card-toolkit JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/tensorflow/model-card-toolkit
SummaryModel Card Toolkit
upload_time2023-04-03 18:03:39
maintainer
docs_urlNone
authorGoogle LLC
requires_python>=3.7,<4
licenseApache 2.0
keywords model card toolkit ml metadata machine learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Model Card Toolkit

The Model Card Toolkit (MCT) streamlines and automates generation of [Model Cards](https://modelcards.withgoogle.com/about) [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](https://raw.githubusercontent.com/tensorflow/model-card-toolkit/main/model_card_toolkit/documentation/guide/images/model_card.png)

## Installation

The Model Card Toolkit is hosted on [PyPI](https://pypi.org/project/model-card-toolkit/), 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](model_card_toolkit/documentation/guide/install.md) 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)](https://www.tensorflow.org/tfx), you can
incorporate model card generation into your TFX pipeline via the `ModelCardGenerator`
component.

The `ModelCardGenerator` component is moving to the
[TFX Addons](https://github.com/tensorflow/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:

```sh
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



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tensorflow/model-card-toolkit",
    "name": "model-card-toolkit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4",
    "maintainer_email": "",
    "keywords": "model card toolkit ml metadata machine learning",
    "author": "Google LLC",
    "author_email": "tensorflow-extended-dev@googlegroups.com",
    "download_url": "",
    "platform": null,
    "description": "# Model Card Toolkit\n\nThe Model Card Toolkit (MCT) streamlines and automates generation of [Model Cards](https://modelcards.withgoogle.com/about) [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.\n\nSome use cases of model cards include:\n\n* Facilitating the exchange of information between model builders and product developers.\n* Informing users of ML models to make better-informed decisions about how to use them (or how not to use them).\n* Providing model information required for effective public oversight and accountability.\n\n![Generated model card image](https://raw.githubusercontent.com/tensorflow/model-card-toolkit/main/model_card_toolkit/documentation/guide/images/model_card.png)\n\n## Installation\n\nThe Model Card Toolkit is hosted on [PyPI](https://pypi.org/project/model-card-toolkit/), and can be installed with `pip install model-card-toolkit` (or `pip install model-card-toolkit\n--use-deprecated=legacy-resolver` for versions of pip starting with 20.3). See [the installation guide](model_card_toolkit/documentation/guide/install.md) for more details.\n\n## Getting Started\n\n    import model_card_toolkit\n\n    # Initialize the Model Card Toolkit with a path to store generate assets\n    model_card_output_path = ...\n    mct = model_card_toolkit.ModelCardToolkit(model_card_output_path)\n\n    # Initialize the model_card_toolkit.ModelCard, which can be freely populated\n    model_card = mct.scaffold_assets()\n    model_card.model_details.name = 'My Model'\n\n    # Write the model card data to a proto file\n    mct.update_model_card(model_card)\n\n    # Return the model card document as an HTML page\n    html = mct.export_format()\n\n## Model Card Generation on TFX\n\nIf you are using [TensorFlow Extended (TFX)](https://www.tensorflow.org/tfx), you can\nincorporate model card generation into your TFX pipeline via the `ModelCardGenerator`\ncomponent.\n\nThe `ModelCardGenerator` component is moving to the\n[TFX Addons](https://github.com/tensorflow/tfx-addons) library and will no longer\nbe packaged in Model Card Toolkit from version 2.0.0. Before you can use the\ncomponent, you will need to install the `tfx-addons` package:\n\n```sh\npip install tfx-addons[model_card_generator]\n```\n\nThis page will be updated to include the new links for the Model Cards in TFX\nguide and the end-to-end demo when the migration is completed.\n\n## Schema\n\nModel cards are stored in proto as an intermediate format. You can see the model card JSON schema in the `schema` directory.\n\n## References\n\n[1] https://arxiv.org/abs/1810.03993\n\n\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Model Card Toolkit",
    "version": "2.0.0",
    "split_keywords": [
        "model",
        "card",
        "toolkit",
        "ml",
        "metadata",
        "machine",
        "learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e686e4c3f63cd6dbba95e22d56f4f5e486f3dc78762b3b053f7ee0b50bafd0c5",
                "md5": "457907e5797ffad644a443200fce6651",
                "sha256": "b195c4678529c6f14096b60ee263c81ff7c81c27773f90e81e55d06923d95844"
            },
            "downloads": -1,
            "filename": "model_card_toolkit-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "457907e5797ffad644a443200fce6651",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4",
            "size": 68829,
            "upload_time": "2023-04-03T18:03:39",
            "upload_time_iso_8601": "2023-04-03T18:03:39.087300Z",
            "url": "https://files.pythonhosted.org/packages/e6/86/e4c3f63cd6dbba95e22d56f4f5e486f3dc78762b3b053f7ee0b50bafd0c5/model_card_toolkit-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-03 18:03:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "tensorflow",
    "github_project": "model-card-toolkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "model-card-toolkit"
}
        
Elapsed time: 0.09478s