Closed ecpark4545 closed 4 years ago
You can rely on relative imports and change the lines in relevant files such as in mm_action_prediction/tools/embed_furniture_assets.py to
import support
instead of
from tools import support
or you can try changing to provide absolute imports (with some changes in bash scripts and having the directory as a module)
from mm_action_prediction.tools import support
Hello @ecpark4545 ,
In addition to the suggestions here (thanks @shubhamagarwal92), another quick one would be to add the current directory to your python search path by running (once) on your command line:
export PYTHONPATH="."
Hope this helps!
First of all, thank you for opening these datasets and baselines. But when I run scripts/preprocess_simmc.sh, I got some issues about import modules
` Reading: ../data/simmc_furniture/furniture_train_dials.json Saving: ../data/simmc_furniture/furniture_train_dials_api_calls.json Reading: ../data/simmc_furniture/furniture_dev_dials.json Saving: ../data/simmc_furniture/furniture_dev_dials_api_calls.json Reading: ../data/simmc_furniture/furniture_devtest_dials.json Saving: ../data/simmc_furniture/furniture_devtest_dials_api_calls.json Reading: ../data/simmc_furniture/furniture_train_dials.json
Identified 2473 words.. Saving dictionary: ../data/simmc_furniture/furniture_vocabulary.json
Traceback (most recent call last): File "tools/embed_furniture_assets.py", line 12, in
from tools import data_support
ModuleNotFoundError: No module named 'tools'
Traceback (most recent call last):
File "tools/build_multimodal_inputs.py", line 18, in
from tools import support
ModuleNotFoundError: No module named 'tools'
Traceback (most recent call last):
File "tools/build_multimodal_inputs.py", line 18, in
from tools import support
ModuleNotFoundError: No module named 'tools'
Traceback (most recent call last):
File "tools/build_multimodal_inputs.py", line 18, in
from tools import support
ModuleNotFoundError: No module named 'tools'
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)[()]
FileNotFoundError: [Errno 2] No such file or directory: '../data/simmc_furniture/furniture_train_dials_mm_inputs.npy'`