tensorflow / tfx-addons

Developers helping developers. TFX-Addons is a collection of community projects to build new components, examples, libraries, and tools for TFX. The projects are organized under the auspices of the special interest group, SIG TFX-Addons. Join the group at http://goo.gle/tfx-addons-group

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModelCardGenerator component cannot run in Vertex AI

jeongukjae opened this issue · comments

Expected Behavior

Actual Behavior

Vertex AI requires artifact schema title to be ^[a-z][a-z0-9-_]{2,20}[.][A-Z][a-zA-Z0-9-_]{2,49}$, and model card generator component has output artifact typed tfx_addons.model_card_generator.artifact.ModelCard. So it cannot be run in Vertex AI.

Error message:

com.google.cloud.ai.platform.common.errors.AiPlatformException: code=INVALID_ARGUMENT, message=MetadataSchema must include a schema title that satisfies the following regex: ^[a-z][a-z0-9-_]{2,20}[.][A-Z][a-zA-Z0-9-_]{2,49}$, cause=null

Steps to Reproduce the Problem

Specifications

tensorflow==2.9.3
tfx==1.9.1
tfx-addons==0.6.0
...
  • Version:
  • Platform: Vertex AI

Related issue:

Oh, it was resolved at v1.12. Closing this issue.

Oh, not resolved in v1.12! sorry.

In v1.12, there are another errors.

ModelCard artifact does not satisfy the schema title regex (^[a-z][a-z0-9-_]{2,20}[.][A-Z][a-zA-Z0-9-_]{2,49}$, no nested classpath).
So ModelCard artifact's TYPE_NAME should be updated.

https://github.com/tensorflow/tfx/blob/2fd4f95ce3e631e7763611fd8ed631d59bc053d8/tfx/orchestration/kubeflow/v2/compiler_utils.py#L302-L335

ModelCard artifact type should be accessible from tfx_addons (top-level module) to be resolved in kubeflow v2's container entrypoint.
So tfx-addons should export all artifact types from top-level.

https://github.com/tensorflow/tfx/blob/2fd4f95ce3e631e7763611fd8ed631d59bc053d8/tfx/orchestration/kubeflow/v2/container/kubeflow_v2_entrypoint_utils.py#L219-L234

Same issue with #249