YuanGongND / ast

Code for the Interspeech 2021 paper "AST: Audio Spectrogram Transformer".
BSD 3-Clause "New" or "Revised" License
1.13k stars 212 forks source link

csv error #132

Open mooncv opened 4 months ago

mooncv commented 4 months ago

When running, the following error occurs and the number of training sessions is limited to 50. Is it necessary to save csv? I am wondering if there is a way to fix the error or resolve the issue by not saving.

+ python ./get_esc_result.py --exp_path ./exp/test-esc50-f10-t10-impTrue-aspTrue-b16-lr1e-5
Traceback (most recent call last):
  File "/kaggle/working/ast/egs/esc50/./get_esc_result.py", line 21, in <module>
    result = np.loadtxt(args.exp_path+'/fold' + str(fold) + '/result.csv', delimiter=',')
  File "/opt/conda/lib/python3.10/site-packages/numpy/lib/npyio.py", line 1373, in loadtxt
    arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter,
  File "/opt/conda/lib/python3.10/site-packages/numpy/lib/npyio.py", line 992, in _read
    fh = np.lib._datasource.open(fname, 'rt', encoding=encoding)
  File "/opt/conda/lib/python3.10/site-packages/numpy/lib/_datasource.py", line 193, in open
    return ds.open(path, mode, encoding=encoding, newline=newline)
  File "/opt/conda/lib/python3.10/site-packages/numpy/lib/_datasource.py", line 533, in open
    raise FileNotFoundError(f"{path} not found.")
FileNotFoundError: ./exp/test-esc50-f10-t10-impTrue-aspTrue-b16-lr1e-5/fold1/result.csv not found.
YuanGongND commented 3 months ago

This is likely due to the path "./exp/test-esc50-f10-t10-impTrue-aspTrue-b16-lr1e-5/fold1/" does not exist, our code should automatically mkdir that, but failed due to some reason like permission issue. Do you have w permission? It may not related to csv, and you do not have to save csv, it is just for logging purpose. But if you have permission issue, even you comment out this line you may still get into other bugs.