C2w2 CsvExampleGen not define

Hello all

Pls help me in this error to solve.

NameError Traceback (most recent call last)
in
4
5 # Instantiate ExampleGen with the input CSV dataset
----> 6 example_gen = CsvExampleGen(input_base=_data_root)

  7 
  8 # Run the component using the InteractiveContext instance

NameError: name ‘CsvExampleGen’ is not defined

Thank you

Did you import csvexamplegen in the cells above?

Adding tfx.components had solve problem

like tfx.components.CsvExampleGen(input_base=_data_root)
this will work fine.

thanks

2 Likes