facebookresearch / simmc

With the aim of building next generation virtual assistants that can handle multimodal inputs and perform multimodal actions, we introduce two new datasets (both in the virtual shopping domain), the annotation schema, the core technical tasks, and the baseline models. The code for the baselines and the datasets will be opensourced.
Other
131 stars 36 forks source link

bug in run scripts/preprocess_simmc.sh #56

Closed Ner0oooooo closed 3 years ago

Ner0oooooo commented 3 years ago

When I run scripts/preprocess_simmc.sh,I had some issue about file missing First I print sh scripts/preprocess_simmc.sh,then

Traceback (most recent call last): File "tools/extract_actions.py", line 1210, in app.run(main) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "tools/extract_actions.py", line 1198, in main furniture_db = data_support.FurnitureDatabase(FLAGS.metadata_path) File "/home/chenrj/simmc/mm_action_prediction/tools/data_support.py", line 169, in init row.append(row[headers.index('obj')].split('/')[-1].split('.zip')[0]) ValueError: 'obj' is not in list Reading: ../data/simmc_furniture/furniture_train_dials.json Traceback (most recent call last): File "tools/extract_vocabulary.py", line 72, in main(parsed_args) File "tools/extract_vocabulary.py", line 17, in main train_data = json.load(file_id) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Reading: ../data/simmc_furniture/furniture_metadata.csv Traceback (most recent call last): File "tools/embed_furniture_assets.py", line 94, in main(parsed_args) File "tools/embed_furniture_assets.py", line 23, in main assets = data_support.read_furniture_metadata(args["input_csv_file"]) File "/home/chenrj/simmc/mm_action_prediction/tools/data_support.py", line 132, in read_furniture_metadata new_asset["id"] = int(new_asset["obj"].split("/")[-1].split(".")[0]) KeyError: 'obj' Reading: ../data/simmc_furniture/furniture_train_dials.json Traceback (most recent call last): File "tools/build_multimodal_inputs.py", line 370, in app.run(main) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "tools/build_multimodal_inputs.py", line 364, in main mm_inputs_split = build_multimodal_inputs(input_json_file) File "tools/build_multimodal_inputs.py", line 58, in build_multimodal_inputs data = json.load(file_id) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Reading: ../data/simmc_furniture/furniture_dev_dials.json Traceback (most recent call last): File "tools/build_multimodal_inputs.py", line 370, in app.run(main) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "tools/build_multimodal_inputs.py", line 364, in main mm_inputs_split = build_multimodal_inputs(input_json_file) File "tools/build_multimodal_inputs.py", line 58, in build_multimodal_inputs data = json.load(file_id) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Reading: ../data/simmc_furniture/furniture_devtest_dials.json Traceback (most recent call last): File "tools/build_multimodal_inputs.py", line 370, in app.run(main) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 303, in run _run_main(main, args) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main sys.exit(main(argv)) File "tools/build_multimodal_inputs.py", line 364, in main mm_inputs_split = build_multimodal_inputs(input_json_file) File "tools/build_multimodal_inputs.py", line 58, in build_multimodal_inputs data = json.load(file_id) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 299, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, kw) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Traceback (most recent call last): File "tools/extract_attribute_vocabulary.py", line 149, in extract_action_attributes(parsed_args) File "tools/extract_attribute_vocabulary.py", line 41, in extract_action_attributes data = np.load(args["train_npy_path"], allow_pickle=True)[()] File "/home/chenrj/anaconda3/envs/mul/lib/python3.6/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: '../data/simmc_furniture/furniture_train_dials_mm_inputs.npy'

satwikkottur commented 3 years ago

Hello @Ner0oooooo ,

Thanks for your interest. Looking at your error log, particularly,

File "tools/extract_actions.py", line 1198, in main furniture_db = data_support.FurnitureDatabase(FLAGS.metadata_path) File "/home/chenrj/simmc/mm_action_prediction/tools/data_support.py", line 169, in init row.append(row[headers.index('obj')].split('/')[-1].split('.zip')[0]) ValueError: 'obj' is not in list

it appears that the data/simmc_furniture/furniture_metadata.csv is corrupted at the header. Could you please double check if your local copy matches with the reference here?

Alternatively, you could hard reset the local state to master and run the script again if you do not have any local changes.

Ner0oooooo commented 3 years ago

@satwikkottur , Thanks for your answer. I already sloved this problem. I just need to install git-fls that I didn't install it very well before because I can't install it directly through git lfs install .

I have to find the download link for the installation package and manually download it.

And pip install en_vectors_web_lg-2.1.0.tar.gz to install it

satwikkottur commented 3 years ago

Great. For reference, here are the instructions for installing lfs.