C2W3 ImportSchemaGen


I have a question regarding the ImportSchemaGen in week 3. The lab works but when I download the notebook and try to run it locally, I get an error.

(I have the following versions of the libraries:
TensorFlow version: 2.9.1
TFX version: 1.9.0
TensorFlow Data Validation version: 1.9.0
TensorFlow Transform version: 1.9.0)

When I try to run the context with the curated schema (ImportSchemaGen from the updated_schema schema.pbtxt file), an error appears saying it cannot add another Artifact with the same type id and name. This makes sense to me considering that there already is a schema with the same name (“schema”) in the pipeline.

Therefore, I do not understand how come during the lab we do not have to delete the old schema before adding the new one considering they have the same name (‘schema’) and type_id (18)
Thank you

Lab uses tfx 1.3 if you want to dig into the source code.

Really helpful thanks