C2W2_Assignment - Required Libraries not Imported

Hi All

  • Week 2 Assignment

The lab does not import some libraries, example error i have one i run some cells ( NameError: name ‘CsvExampleGen’ is not defined )

And when i import it, it grade me with zero because i’ve add new codes, so how can i solve this ?

Please don’t add additional imports outside of graded cells. When in doubt, use fully qualified references based on the existing imports.

If i don’t add more imports, codes show error some libraries not found or impoted

Every time you open a notebook, you must run all of the cells starting at the top of the page. That’s where the assets are loaded.

let me check today, hope it will work, THANKS Super Mentor

I didn’t, but see what i got

NameError Traceback (most recent call last)
5 # Instantiate ExampleGen with the input CSV dataset
----> 6 example_gen = CsvExampleGen(input_base=_data_root)
8 # Run the component using the InteractiveContext instance

NameError: name ‘CsvExampleGen’ is not defined

Try tfx.components.CsvExampleGen