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
Apache License 2.0
125 stars 62 forks source link

ModelCardGenerator component cannot run in Vertex AI #259

Open jeongukjae opened 1 year ago

jeongukjae commented 1 year ago

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

1. 1. 1.

Specifications

tensorflow==2.9.3
tfx==1.9.1
tfx-addons==0.6.0
...

Related issue:

jeongukjae commented 1 year ago

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

jeongukjae commented 1 year ago

Oh, not resolved in v1.12! sorry.

jeongukjae commented 1 year ago

In v1.12, there are another errors.

1.

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

2.

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

jeongukjae commented 1 year ago

Same issue with https://github.com/tensorflow/tfx-addons/issues/249