This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
v1.2.0
Release 1.2.0
Major Features and Improvements
ModelCard
updates- Fields
- Add
model_details.path
.- This is populated with the new
ModelSource
object, which stores a reference to a TFX PushedModel.
- This is populated with the new
- Add
model_parameters.input_format_map
andmodel_parameters.output_format_map
.- These are key-value pairs, and are used to render inputs and outputs in tabular form. They can be used as an alternative to the singular
model_parameters.input_format
andmodel_parameters.output_format
fields.
- These are key-value pairs, and are used to render inputs and outputs in tabular form. They can be used as an alternative to the singular
- Add
- Functions
- Add
from_json()
.
- Add
- Fields
model_card_toolkit.source
- This is a new submodule, and is responsible for
ModelCardToolkit
's' inputs (see TFX standard artifacts). It provides the following classes:MlmdSource
: Args to extract data from TFX artifacts in MLMD. Contains themlmd_store
andmodel_uri
args. Previously, these were args toModelCardToolkit
.Source
: Args to extract data from TFX artifacts outside MLMD (by passing in a path to the artifact, or by passing in the artifact directly). Containstfma
,tfdv
, andmodel
args.
- This is a new submodule, and is responsible for
Bug fixes and other changes
ModelCardToolkit
model_card.quantitative_analysis.performance_metrics
is now populated when atfma.EvalResult
is found in MLMD store.export_format()
andupdate_model_card()
now acceptmodel_card_pb2.ModelCard
's, in addition tomodel_card.ModelCard
's.
tfx_util
- Add
annotate_eval_result_metrics()
, which appendsPerformanceMetrics
to aModelCard
based on atfma.EvalResult
. - Add
read_stats_protos()
, which returns dataset stats protos for all splits in the provided directory. - Add
filter_metrics()
to facilitate filtering out unwanted TFMA metrics in model cards. - Add
filter_features()
andtfx._util.read_stats_protos_and_filter_features()
to facilitate filtering out unwanted TFDV features in model cards.
- Add
PerformanceMetrics
- Add
confidence_interval
field.
- Add
Breaking changes and Deprecations
- Replace
ModelCardToolkit(output_dir, mlmd_store, model_uri)
withModelCardToolkit(output_dir, mlmd_source, source)
. See "Major Features and Improvements" above for details. - Complete deprecation of
ModelCardToolkit.update_model_card_json()
. Users should migrate toModelCardToolkit.update_model_card()
, which uses a proto representation. Alternatively, users can useModelCard.to_json()
andModelCard.from_json()
to interact with JSON representations.