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

error running Convtasnet on Librimix #539

Closed
nobel861017 opened this issue Aug 8, 2021 · 2 comments
Closed

error running Convtasnet on Librimix #539

nobel861017 opened this issue Aug 8, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@nobel861017
Copy link
Contributor

nobel861017 commented Aug 8, 2021

Hi, has anyone been able to run egs/librimix/ConvTasNet/run.sh successfully?
I encountered problems at stage 2.

Stage 1: Generating csv files including wav path and duration
Results from the following experiment will be stored in exp/train_convtasnet_9feb1466
Stage 2: Training
{'data': {'n_src': 2,
          'sample_rate': 8000,
          'segment': 3,
          'task': 'sep_clean',
          'train_dir': '/home/gerber68/Data/Libri2Mix/wav8k/min/train-100',
          'valid_dir': '/home/gerber68/Data/Libri2Mix/wav8k/min/dev'},
 'filterbank': {'kernel_size': 16, 'n_filters': 512, 'stride': 8},
 'main_args': {'exp_dir': 'exp/train_convtasnet_9feb1466', 'help': None},
 'masknet': {'bn_chan': 128,
             'hid_chan': 512,
             'mask_act': 'relu',
             'n_blocks': 8,
             'n_repeats': 3,
             'skip_chan': 128},
 'optim': {'lr': 0.001, 'optimizer': 'adam', 'weight_decay': 0.0},
 'positional arguments': {},
 'training': {'batch_size': 24,
              'early_stop': True,
              'epochs': 200,
              'half_lr': True,
              'num_workers': 4}}
Traceback (most recent call last):
  File "train.py", line 145, in <module>
    main(arg_dic)
  File "train.py", line 28, in main
    train_set = LibriMix(
  File "/home/gerber68/asteroid/asteroid/data/librimix_dataset.py", line 66, in __init__
    self.df = pd.read_csv(self.csv_path)
  File "/home/gerber68/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 686, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/home/gerber68/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 452, in _read
    parser = TextFileReader(fp_or_buf, **kwds)
  File "/home/gerber68/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 946, in __init__
    self._make_engine(self.engine)
  File "/home/gerber68/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 1178, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/home/gerber68/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 2008, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 537, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 711, in pandas._libs.parsers.TextReader._get_header
  File "pandas/_libs/parsers.pyx", line 905, in pandas._libs.parsers.TextReader._tokenize_rows
  File "pandas/_libs/parsers.pyx", line 2042, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='pyt
hon'.

I checked the code of create_local_metadata.py, and found out that the variable md_dirs in function create_local_metadata() is an empty list. Hence, causing self.df = pd.read_csv(self.csv_path) in librimix_dataset.py reading the wrong csv path.

Does anyone know what's going on?

@nobel861017 nobel861017 added bug Something isn't working help wanted Extra attention is needed labels Aug 8, 2021
@nobel861017
Copy link
Contributor Author

I think I figured out the problem.
In line 18 of create_local_metadata.py, I printed out librimix_dir.

/home/gerber68/Data//Librin_srcMix

I solved the problem by changing line 13 in prepare_data.sh to changed_n_src=$n_src.

@LiuSiQi-TJ
Copy link

did you donwload metadata in librimix? you need to set correct path in perpare_data.sh, --librimix_dir, i change changed_n_src to 2 if n_src is 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants