Repository: tensorflow/tfx

Issue #2506: "Type already exists with different properties error" when running TFX 0.21.2 and TFX 0.23.0 in same kubeflow
Created: 2020-09-17T20:52:05Z
One of the users of my kubeflow cluster is using TFX 0.21.4 and another is using TFX 0.23.0
After any pipeline is run that uses TFX 0.23.0, the ones that use TFX 0.21.4 fail with the following error during BigQueryExampleGen
Traceback (most recent call last):
  File "/tfx-src/tfx/orchestration/kubeflow/container_entrypoint.py", line 382, in <module>
    main()
  File "/tfx-src/tfx/orchestration/kubeflow/container_entrypoint.py", line 375, in main
    execution_info = launcher.launch()
  File "/tfx-src/tfx/orchestration/launcher/base_component_launcher.py", line 197, in launch
    self._exec_properties)
  File "/tfx-src/tfx/orchestration/launcher/base_component_launcher.py", line 166, in _run_driver
    component_info=self._component_info)
  File "/tfx-src/tfx/components/base/base_driver.py", line 289, in pre_execution
    contexts=contexts)
  File "/tfx-src/tfx/orchestration/metadata.py", line 601, in update_execution
    registered_artifacts_ids=registered_output_artifact_ids))
  File "/tfx-src/tfx/orchestration/metadata.py", line 538, in _artifact_and_event_pairs
    a.set_mlmd_artifact_type(self._prepare_artifact_type(a.artifact_type))
  File "/tfx-src/tfx/orchestration/metadata.py", line 184, in _prepare_artifact_type
    artifact_type=artifact_type, can_add_fields=True)
  File "/opt/venv/lib/python3.6/site-packages/ml_metadata/metadata_store/metadata_store.py", line 268, in put_artifact_type
    self._call('PutArtifactType', request, response)
  File "/opt/venv/lib/python3.6/site-packages/ml_metadata/metadata_store/metadata_store.py", line 131, in _call
    return self._call_method(method_name, request, response)
  File "/opt/venv/lib/python3.6/site-packages/ml_metadata/metadata_store/metadata_store.py", line 162, in _call_method
    raise _make_exception(e.details(), e.code().value[0])
tensorflow.python.framework.errors_impl.AlreadyExistsError: Type already exists with different properties.


I completely wiped out my kubeflow cluster/metadata to test from scratch, and the same thing happens. Is there any way to avoid that short of forcing everyone to be on the same tfx version?

Duplicate issue #2583: Not able to change @component function signature after component execution
Created: 2020-09-29T19:15:42Z
Hi TFX team, we encountered "ValueError: missing or modified key in exec_properties comparing with existing execution type with the same type name."
If I am not mistaken, the reason is the name of the class is being used node_id in BaseNode, and once TFX registers execution of the component in MLMD, the class name and the exec_properties are set in stone and cannot be changed, unless we name the class differently, and a new component will then be registered in MLMD.
This is a bit counterintuitive since users go through iterations before they have fully tested and settle on a version of the component. There should be a way/ flag to indicate if the component properties should be updated or not (default to False), or offer a method to update the component properties.

Closing comment (2020-10-06T02:29:06Z): This may be related to #2506. If we remove exec properties it breaks. Which is not expected. Would be nice to issue a fix for both of them.