hugochan/BAMnet

FileNotFoundError: [Errno 2] No such file or directory: '../data/WebQ/train.json'

Dobatymo opened this issue · 3 comments

Running any of the commands from the readme gives: FileNotFoundError: [Errno 2] No such file or directory: '../data/WebQ/train.json' even though this file is not mentioned in the config and does not exist in the pretrained model. This file is probably hardcoded and the filename from the config should be used instead.

Encountering same error. And there are other files that are missing in the data folder that is shared. Build_data folder under src has build_all.py file. There are some other files that are needed to run that file. Can you look into this please?

Trace-back (most recent call last):
File "joint_test.py", line 33, in
build(entnet_opt['data_dir'])
File "/BAMnet/src/core/build_data/build_all.py", line 26, in build
train_data = load_ndjson(os.path.join(dpath, 'train.json'))
File "
/BAMnet/src/core/utils/utils.py", line 71, in load_ndjson
return load_ndjson_to_array(file)
File "/BAMnet/src/core/utils/utils.py", line 84, in load_ndjson_to_array
raise e
File "
/BAMnet/src/core/utils/utils.py", line 80, in load_ndjson_to_array
with open(file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '../data/WebQ/train.json'

@sharathjapa @Dobatymo Thank you for reporting the issue! Please check out the latest code and download the built.log file from here and put it in the data/WebQ folder. This should fix the issue.

The code will check if 'built.log' exists in the data folder or not to tell if the preprocessed data is valid and complete. I will soon release the raw data which you can use to create the preprocessed data on your own by running the build_all_data.py script.

@sharathjapa @Dobatymo FYI, I also added instructions on how to preprocess the data on your own in README.