Error when I run the NLP tutorial

Hi, I’m a newbie using fastai v1. When I run the official guide, there seems an error occurred.

when I ran the code:

from fastai import *
from fastai.text import * 
path = untar_data(URLs.IMDB_SAMPLE)
data_lm = TextLMDataBunch.from_csv(path, 'texts.csv')

Then I got the error message:

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
<ipython-input-49-9c2ead2e8bda> in <module>()
----> 1 data_lm = TextLMDataBunch.from_csv(path,'texts.csv')

/opt/software/anaconda3/lib/python3.6/site-packages/fastai/text/data.py in from_csv(cls, path, tokenizer, train, valid, test, vocab, **kwargs)
    330         "Create a `TextDataBunch` from texts in csv files."
    331         header = 'infer' if 'txt_cols' in kwargs else None
--> 332         train_df = pd.read_csv(os.path.join(path, train+'.csv'), header=header)
    333         valid_df = pd.read_csv(os.path.join(path, valid+'.csv'), header=header)
    334         test_df = None if test is None else pd.read_csv(os.path.join(path, test+'.csv'), header=header)

/opt/software/anaconda3/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, skip_footer, doublequote, delim_whitespace, as_recarray, compact_ints, use_unsigned, low_memory, buffer_lines, memory_map, float_precision)
    703                     skip_blank_lines=skip_blank_lines)
    704 
--> 705         return _read(filepath_or_buffer, kwds)
    706 
    707     parser_f.__name__ = name

/opt/software/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py in _read(filepath_or_buffer, kwds)
    443 
    444     # Create the parser.
--> 445     parser = TextFileReader(filepath_or_buffer, **kwds)
    446 
    447     if chunksize or iterator:

/opt/software/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py in __init__(self, f, engine, **kwds)
    812             self.options['has_index_names'] = kwds['has_index_names']
    813 
--> 814         self._make_engine(self.engine)
    815 
    816     def close(self):

/opt/software/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py in _make_engine(self, engine)
   1043     def _make_engine(self, engine='c'):
   1044         if engine == 'c':
-> 1045             self._engine = CParserWrapper(self.f, **self.options)
   1046         else:
   1047             if engine == 'python':

/opt/software/anaconda3/lib/python3.6/site-packages/pandas/io/parsers.py in __init__(self, src, **kwds)
   1682         kwds['allow_leading_cols'] = self.index_col is not False
   1683 
-> 1684         self._reader = parsers.TextReader(src, **kwds)
   1685 
   1686         # XXX

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'/home/jiangtao/.fastai/data/imdb_sample/train.csv' does not exist

Can anyone tell me what’s going on and how to fix it?


=== Software === 
python version  : 3.6.3
fastai version  : 1.0.19
torch version   : 1.0.0.dev20181105
nvidia driver   : 390.48
torch cuda ver  : 9.0.176
torch cuda is   : available
torch cudnn ver : 7102
torch cudnn is  : enabled

=== Hardware === 
nvidia gpus     : 4
torch available : 4
  - gpu0        : 11177MB | GeForce GTX 1080 Ti
  - gpu1        : 11178MB | GeForce GTX 1080 Ti
  - gpu2        : 11178MB | GeForce GTX 1080 Ti
  - gpu3        : 11178MB | GeForce GTX 1080 Ti

=== Environment === 
platform        : Linux-4.4.0-128-generic-x86_64-with-debian-stretch-sid
distro          : #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018
conda env       : Unknown
python          : /opt/software/anaconda3/bin/python
sys.path        : 
/opt/software/anaconda3/lib/python36.zip
/opt/software/anaconda3/lib/python3.6
/opt/software/anaconda3/lib/python3.6/lib-dynload
/opt/software/anaconda3/lib/python3.6/site-packages
/opt/software/anaconda3/lib/python3.6/site-packages/IPython/extensions

Thu Nov 15 20:14:24 2018       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.48                 Driver Version: 390.48                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:02:00.0 Off |                  N/A |
| 20%   34C    P8    17W / 250W |     18MiB / 11177MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:03:00.0 Off |                  N/A |
| 20%   38C    P8    11W / 250W |     18MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   2  GeForce GTX 108...  Off  | 00000000:82:00.0 Off |                  N/A |
| 20%   36C    P8     9W / 250W |     18MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
|   3  GeForce GTX 108...  Off  | 00000000:83:00.0 Off |                  N/A |
| 20%   33C    P8     9W / 250W |     18MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Update your fastai library to the latest version.

I’m running the the NLP notebook [using the latest fastai - 1.0.43]


and got the following error message:

It not appear to be a memory failure (neither CPU nor GPU)
What could be the problem?

Thanks a lot
Moran

You don’t have enough RAM available if you have that error.