FileNotFoundError

#3 · closed · 2 comments

View on GitHub ↗

changleilei

sh scripts/multiwoz2.0/infer.sh params as below: #!/bin/bash set -ux # CUDA environment settings. export CUDA_VISIBLE_DEVICES=0 # Parameters. DATA_NAME=multiwoz PROJECT_NAME=GALAXY MODEL=UnifiedTransformer PROJECT_ROOT=/data/cll/${PROJECT_NAME} SAVE_ROOT=/data/cll/${PROJECT_NAME} VOCAB_PATH=${PROJECT_ROOT}/model/Bert/vocab.txt VERSION=2.0 LOAD_MODEL_DIR=110-35 LOAD_MODEL_NAME=state_epoch_7 INIT_CHECKPOINT=${SAVE_ROOT}/outputs/${DATA_NAME}${VERSION}/${LOAD_MODEL_DIR}/${LOAD_MODEL_NAME} WITH_JOINT_ACT=false USE_TRUE_PREV_BSPN=false USE_TRUE_PREV_ASPN=false USE_TRUE_PREV_RESP=false USE_TRUE_CURR_BSPN=false USE_TRUE_CURR_ASPN=false USE_TRUE_DB_POINTER=false USE_ALL_PREVIOUS_CONTEXT=true BATCH_SIZE=1 BEAM_SIZE=1 NUM_GPU=1 SEED=10 SAVE_DIR=${SAVE_ROOT}/outputs/${DATA_NAME}${VERSION}/${LOAD_MODEL_DIR}.infer # Main run. python -u run.py \ --do_infer=true \ --model=${MODEL} \ --save_dir=${SAVE_DIR} \ --data_name=${DATA_NAME} \ --data_root=${PROJECT_ROOT} \ --vocab_path=${VOCAB_PATH} \ --init_checkpoint=${INIT_CHECKPOINT} \ --with_joint_act=${WITH_JOINT_ACT} \ --use_true_prev_bspn=${USE_TRUE_PREV_BSPN} \ --use_true_prev_aspn=${USE_TRUE_PREV_ASPN} \ --use_true_prev_resp=${USE_TRUE_PREV_RESP} \ --use_true_curr_bspn=${USE_TRUE_CURR_BSPN} \ --use_true_curr_aspn=${USE_TRUE_CURR_ASPN} \ --use_true_db_pointer=${USE_TRUE_DB_POINTER} \ --use_all_previous_context=${USE_ALL_PREVIOUS_CONTEXT} \ --batch_size=${BATCH_SIZE} \ --beam_size=${BEAM_SIZE} \ --version=${VERSION} \ --gpu=${NUM_GPU} \ --seed=${SEED} \ --max_len=1024 \ --max_ctx_turn=20 \ --num_act=20 \ --num_type_embeddings=2 \ --data_processed=data_for_galaxy_encoded.data.json error: Traceback (most recent call last): File "run.py", line 130, in <module> main() File "run.py", line 74, in main bpe = MultiWOZBPETextField(hparams) File "/data/cll/GALAXY/galaxy/data/field.py", line 356, in __init__ self._build_vocab() File "/data/cll/GALAXY/galaxy/data/field.py", line 498, in _build_vocab self.vocab.load_vocab(vp) File "/data/cll/GALAXY/galaxy/utils/utils.py", line 199, in load_vocab self._freq_dict = json.loads(open(vocab_path + '.freq.json', 'r').read()) FileNotFoundError: [Errno 2] No such file or directory: '/data/cll/GALAXY/data/multiwoz2.0/vocab.freq.json' In project document GALAXY have no "data/multiwoz2.0/vocab.freq.json", where can I get this file? Same error happened in ”scripts/camrest/infer.sh“:FileNotFoundError: [Errno 2] No such file or directory: 'data/camrest/CamRestOTGY.json'

Comments

HwwAncient

As said in README.md, you need to download the 'data.zip' file from the offered link, then unzip it into the correct directory. ![image](https://user-images.githubusercontent.com/38929139/154282750-c97cc970-bafc-4392-920c-a3849bd1da24.png) Also, you should download other required files including outputs.zip and model.zip to reproduce our reported results. We suggest that you could read README.md first and follow the relevant instructions. Thank you.

changleilei

Thank you! The problem is solved!