question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot import name 'csv_input'

See original GitHub issue

I followed this tutorial (tfx - guide - examplegen), but I cannot import csv_input from tfx.utils.dsl_utils.

To reproduce: colab link (tfx==0.26.0)


I found another tutorial (tfx - tutorials - TFX Keras Component Tutorial) that explains proper usage. example gen tutorial should be fixed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pindinageshcommented, Oct 5, 2021

@jeongukjae

Closing the issue as the PR is already merged which fixes the issue. Thanks

1reaction
arghyagangulycommented, Jan 19, 2021

@jeongukjae , looking at : https://github.com/tensorflow/tfx/blob/v0.26.0/tfx/utils/dsl_utils.py

and comparing with earlier versions, it seems that csv_input has been depreciated in tfx==0.26.0. or in an earlier version. try with :-

import os
import tfx
from tfx.utils.dsl_utils import external_input
from tfx.components.example_gen.csv_example_gen.component import CsvExampleGen
_data_root = "address to data directory" #address till the directory where csv file is present
_data_filepath = os.path.join(_data_root,"data.csv") #data.csv being the csv file
example_gen = CsvExampleGen(input=external_input(_data_filepath))

Please confirm if this works for you. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid column count in CSV input on line 1 Error
I have created 47 columns in my SQL table. The names however aren't exactly the same as the ones in the file. Whenever...
Read more >
Cannot import name 'AssetManifestOptions' from 'aws_cdk ...
I am using virual env in python for this app. ANy help would be really heplful. Exception : ImportError: cannot import name 'AssetManifestOptions'...
Read more >
CSVInput - Amazon Simple Storage Service
Describes how an uncompressed comma-separated values (CSV)-formatted input object is formatted. Contents. AllowQuotedRecordDelimiter. Specifies that CSV field ...
Read more >
Invalid column count in CSV input on line 1 Error - SyntaxFix
I have created 47 columns in my SQL table. The names however aren't exactly the same as the ones in the file. Whenever...
Read more >
6 Common CSV Import Errors and How to Fix Them - Flatfile
And since clients can't use your application without being able to populate their data, the CSV import problem often occurs at the most ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found