跳转到主要内容

模型卡片工具包

项目描述

模型卡片工具包

模型卡片工具包(MCT)简化并自动化了模型卡片 [1] 的生成,这是一种提供模型开发和性能背景和透明度的机器学习文档。将MCT集成到您的ML管道中,可以与研究人员、开发者、记者等共享模型元数据和指标。

模型卡的一些用例包括

  • 促进模型构建者和产品开发者之间信息的交流。
  • 告知ML模型用户如何更好地使用它们(或如何不使用它们)。
  • 提供有效公众监督和问责制所需的模型信息。

Generated model card image

安装

模型卡片工具包托管在PyPI上,可以使用pip install model-card-toolkit安装(或对于pip20.3,请使用pip install model-card-toolkit --use-deprecated=legacy-resolver)。有关更多详细信息,请参阅安装指南

入门

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()

自动生成模型卡片

如果您使用的是TensorFlow Extended (TFX)平台或ML Metadata,则可以自动化模型卡片生成。请参阅此演示笔记本,了解如何将MCT集成到您的流水线中。

模式

模型卡片以JSON格式存储为中间格式。您可以在schema目录中查看模型卡片JSON模式。请注意,这不是最终的路径,将来可能托管在其他位置。

参考

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

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

model-card-0.1.3.tar.gz (25.1 kB 查看哈希值)

上传时间

构建分发

model_card-0.1.3-py3-none-any.whl (43.9 kB 查看哈希值)

上传时间 Python 3

由以下组织支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面