Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: File val.csv does not exist #8

Open
Pupinin opened this issue Mar 29, 2019 · 2 comments
Open

FileNotFoundError: File val.csv does not exist #8

Pupinin opened this issue Mar 29, 2019 · 2 comments

Comments

@Pupinin
Copy link

Pupinin commented Mar 29, 2019

While running the notebook I'm stuck at the above mentioned error. The code is:

Eval Fn

eval_examples = processor.get_dev_examples(args['data_dir'], size=args['val_size'])
def eval():
......

Error:
FileNotFoundError Traceback (most recent call last)
in
1 # Eval Fn
----> 2 eval_examples = processor.get_dev_examples(args['data_dir'], size=args['val_size'])
3 def eval():
4 args['output_dir'].mkdir(exist_ok=True)
5

in get_dev_examples(self, data_dir, size)
22 filename = 'val.csv'
23 if size == -1:
---> 24 data_df = pd.read_csv(os.path.join(data_dir, filename))
25 # data_df['comment_text'] = data_df['comment_text'].apply(cleanHtml)
26 return self._create_examples(data_df, "dev")

/anaconda/envs/py36/lib/python3.6/site-packages/pandas/io/parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, skipfooter, doublequote, delim_whitespace, low_memory, memory_map, float_precision)
676 skip_blank_lines=skip_blank_lines)
677
--> 678 return _read(filepath_or_buffer, kwds)
679
680 parser_f.name = name

/anaconda/envs/py36/lib/python3.6/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)
438
439 # Create the parser.
--> 440 parser = TextFileReader(filepath_or_buffer, **kwds)
441
442 if chunksize or iterator:

/anaconda/envs/py36/lib/python3.6/site-packages/pandas/io/parsers.py in init(self, f, engine, **kwds)
785 self.options['has_index_names'] = kwds['has_index_names']
786
--> 787 self._make_engine(self.engine)
788
789 def close(self):

/anaconda/envs/py36/lib/python3.6/site-packages/pandas/io/parsers.py in _make_engine(self, engine)
1012 def _make_engine(self, engine='c'):
1013 if engine == 'c':
-> 1014 self._engine = CParserWrapper(self.f, **self.options)
1015 else:
1016 if engine == 'python':

/anaconda/envs/py36/lib/python3.6/site-packages/pandas/io/parsers.py in init(self, src, **kwds)
1706 kwds['usecols'] = self.usecols
1707
-> 1708 self._reader = parsers.TextReader(src, **kwds)
1709
1710 passed_names = self.names is None

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader.cinit()

pandas/_libs/parsers.pyx in pandas._libs.parsers.TextReader._setup_parser_source()

FileNotFoundError: File b'kaggle_data/toxic_comments/tmp/val.csv' does not exist

@mridulnagpal
Copy link

You can create a val file yourself, just split the train.csv file

@Pupinin
Copy link
Author

Pupinin commented Mar 29, 2019

You can create a val file yourself, just split the train.csv file

Have not thought of that. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants