NameError: name 'ImporterNode' is not defined

In the C2W3_Assignment, in the cell 41, i have this error.
NameError: name ‘ImporterNode’ is not defined
A tried tfx.components, and juste “Importer” as suggested in other posts.
I’ve still the problem.

Anyone has an idea ?

Hi @Malfondet_Luc ,

Please DM me your notebook, and we can check what the issue is.


Hi @Malfondet_Luc ,

You need ImportSchemaGen to put the curated schema into ML Metadata, not ImporterNode. Please try this format:


I also noticed in other cells, you need to import the function from the components module such as tfx.components.

Let me know if it helps,

Thanks, it 's working, but it has triggered an other order further:

NameError: name 'statistics_gen_updated' is not defined

Hi @Malfondet_Luc,

This is because the schema=user_schema_importer was not defined. Because it’s the first run of a pipeline, the output of StatisticsGen will be used to infer a schema on the next exercise - SchemaGen. Therefore, you don’t need to define a schema here.

The same goes to the stats_options keys. The infer_type_from_schema=True but we haven’t generated a schema yet.

Happy learning,