TFX Addons follows Semantic Versioning 2.0 strategy.
- See the Release Notes for versions
>1.3.2. - See Past Releases for release notes for versions
<=1.3.2.
- Create new
rX.Ybranch on https://github.com/tensorflow/model-card-toolkit frommain. - Create new PR with updates to
version.pyagainstrX.Ybranch.- Set the correct version and suffix in version.py.
- Ensure proper supported Python libraries are set in setup.py.
- Create a new release from
rX.Ybranch. Create a tag withvX.Y.Zname.- Add updates for new features, enhancements, bug fixes
- Add contributors using
git shortlog <last-version>..HEAD -s
- Create a new PR and merge an increase of
_MINOR_VERSIONin version.py onmainto get ready for next release.
- Cherry-pick commits to
rX.Ybranch. Release team can just port PR by commenting "/cherry-pick rX.Y" in a merged PR. - Create new PR with increasing
_PATCH_VERSIONinversion.pyagainstrX.Ybranch.- Set the correct version and suffix in version.py.
- Ensure proper supported Python libraries are set in setup.py.
- Create a new release from
rX.Ybranch. Create a tag withvX.Y.Zname.- Add updates for new features, enhancements, bug fixes
- Add contributors using
git shortlog <last-version>..HEAD -s
Current Release Team:
- Hannes Hapke - @hanneshapke
- Gerard Casas Saez - @casassg
- Suzen Fylke - @codesue
- Remove
semantic-versiondependency. - Update
jinja2dependency.
- Fix bug where
ModelCardGeneratorfails iftemplate_iois unspecified.
ModelCardArtifact, a TFX/MLMD artifact which references the assets generated by MCT. This can be created withmodel_card_toolkit.tfx.create_and_save_artifact().tfx.executor.Executor, which can be used as the core MCT logic for a TFX custom component.tfx.component.ModelCardGenerator, a component that can be used to generate Model Cards directly in a TFX pipeline.
ModelCard.merge_from_json(), allowingModelCards to be populated with JSON without overwriting all pre-existing fields.- Minor styling change to table CSS in default HTML template
- Minor update to CSS linting in default HTML template
sourceclasses now usestfx.types.Artifactinstead ofstandard_artifacts.
ModelCardupdates- Fields
- Add
model_details.path.- This is populated with the new
ModelSourceobject, which stores a reference to a TFX PushedModel.
- This is populated with the new
- Add
model_parameters.input_format_mapandmodel_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_formatandmodel_parameters.output_formatfields.
- 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_storeandmodel_uriargs. 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, andmodelargs.
- This is a new submodule, and is responsible for
ModelCardToolkitmodel_card.quantitative_analysis.performance_metricsis now populated when atfma.EvalResultis 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 appendsPerformanceMetricsto aModelCardbased 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_intervalfield.
- Add
- 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.
- Update TFX compatibility to TFX 1.2.
- Fix bug where all datasets from MLMD were being compressed into one model_card.Dataset object.
- Introduce
model_card.proto. See https://developers.google.com/protocol-buffers for more info. - All classes in
model_card_toolkit.model_cardsubmodule now haveto_proto(),merge_from_proto(),copy_from_proto(), andclear()functions. ModelCardToolkit.export_format()now acceptsmodel_cardarg.json_util.update(), which updates a v0.0.1 JSON object to a v0.0.2 JSON object.
- Update default template layout so charts can wrap to multiple rows
- Installing from source now requires Bazel>=2.0.0.
- Update model card templates to use new schema.
model_card_toolkit.utils.validation.validate_json_schema()can now validate both schema v0.0.1 and v0.0.2.- Add
_jinja_loaderattribute tomodel_card_toolkitto allow custom Jinja loaders.
- JSON schema v0.0.2 replaces JSON schema v0.0.1.
ModelCardToolkit.update_model_card_json()deprecated and replaced withModelCardToolkit.update_model_card(). Writes todata/model_card.protoinstead ofdata/model_card.json.graphics.annotate_dataset_feature_statistics_plotsaccepts a list of stats files instead of two individual train and eval stats params.
- Update model_card.py docstrings. Now hosted on Responsible AI.
- In default_template.md.jinja and default_template.html.jinja, generate metrics table from
quantitative_analysis.performance_metrics.
- Reference URLs in default HTML and Markdown template are now hyperlinks
- Fix bug where Considerations div is displayed in HTML model cards, even if Considerations div is empty.
- Update required fields in schema.
- Removed considerations as required field.
- Add lower_bound and upper_bound as required fields to confidence_interval.
- Fixed the part dependencies error for new pip dependency resolver.
- Update how UI templates are copied to be compatible with different platforms (colab, wetlab).
- Add model_card_toolkit.validation.validate_json_schema(), a function to validate a Python dictionary against the Model Card JSON schema.
- Fix the bug that some slices may have extra metrics that other slices does not have. e.g. ERROR metric.
- add Markdown template
- remove
quantitative_analysisfrom required fields - add
input_formatandexport_formatfields - add
model_architecture,input_format, andexport_formatto HTML template - add Cats vs Dogs util for
Standalone_Model_Card_toolkit_Demo.ipynb
- Rename
_figure_to_base64strtofigure_to_base64str
Initial release of Model Card Toolkit.