bi-att-flow icon indicating copy to clipboard operation
bi-att-flow copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: 'inter_single/eval.json'

Open rjonesxmoz opened this issue 7 years ago • 4 comments

This was previously closed but I am not sure why. The folder "inter_single/" exists with two .json files in it, neither of which are eval.json

Has anyone identified how to get a copy of this file?

rjonesxmoz avatar Jan 09 '18 22:01 rjonesxmoz

@rjonesxmoz I don't find "inter_single/' can you tell me where ?

houzhenzhen avatar Jun 30 '18 03:06 houzhenzhen

@rjonesxmoz Have you figured where to get a copy of that file? I manually made a file 'eval.json' but I suppose it shouldn't be empty because I'm getting an out of input error. I'm getting the following error after running the script run_single.sh :--

(vur) srishti@VMtwo:~/notebooks/bi-att-flow-demo$ bash basic/run_single.sh $HOME /data/squad/dev-v1.1.json single.json 100%|███████████████████████████████████████████| 48/48 [00:04<00:00, 10.64it/s] 36%|█████████████████████████████████████████████████████▉ | 144729/400000 [00:10<00:19, 13174.72it/s] 20521/26469 of word vocab have corresponding vectors in ./glove.6B.100d.txt 36%|█████████████████████████████████████████████████████▉ | 144729/400000 [00:04<00:07, 34407.53it/s] 20594/23632 of word vocab have corresponding vectors in ./glove.6B.100d.txt saving ... 1224 { 'answer_dir': 'out/basic/00/answer', 'answer_func': 'linear', 'answer_path': '', 'batch_size': 1, 'c2q_att': True, 'char_count_th': 50, 'char_emb_size': 8, 'char_out_size': 100, 'char_vocab_size': 281, 'cluster': True, 'cpu_opt': True, 'data_dir': 'inter_single', 'data_filter': 'max', 'debug': False, 'decay': 0.9, 'device': '/cpu:0', 'device_type': 'gpu', 'dump_answer': False, 'dump_eval': True, 'dump_pickle': True, 'dynamic_att': False, 'eval': True, 'eval_dir': 'out/basic/00/eval', 'eval_path': 'inter_single/eval.json', 'eval_period': 1000, 'filter_heights': '5', 'finetune': False, 'forward_name': 'single', 'hidden_size': 100, 'highway': True, 'highway_num_layers': 2, 'init_lr': 0.5, 'input_keep_prob': 0.8, 'keep_prob': 0.8, 'known_if_glove': True, 'len_opt': True, 'load': True, 'load_ema': True, 'load_path': 'save/37/save', 'load_step': 0, 'log_dir': 'out/basic/00/log', 'log_period': 100, 'logit_func': 'tri_linear', 'lower_word': True, 'max_to_keep': 20, 'mode': 'forward', 'model_name': 'basic', 'new_emb_mat': array([[-0.10957 , -0.0044138, 0.137 , ..., -0.56343 , 0.45623 , -0.1637 ], [ 0.2842 , 0.59621 , -0.58147 , ..., 0.37506 , 0.11688 , -0.1206 ], [ 0.36211 , 0.26966 , -0.14845 , ..., -0.18546 , -1.5487 , -0.0041004], ..., [-0.079885 , 0.7614 , -0.91762 , ..., -0.46399 , 0.48056 , -0.26194 ], [-0.083848 , 0.61089 , -0.15195 , ..., -0.53627 , -0.2864 , 0.66807 ], [ 0.032177 , 0.61358 , 0.027951 , ..., -0.17203 , 0.5637 , 0.32766 ]], dtype=float32), 'num_epochs': 12, 'num_gpus': 1, 'num_sents_th': 8, 'num_steps': 20000, 'out_base_dir': 'out', 'out_channel_dims': '100', 'out_dir': 'out/basic/00', 'para_size_th': 256, 'progress': True, 'q2c_att': True, 'ques_size_th': 30, 'run_id': '0', 'save_dir': 'out/basic/00/save', 'save_period': 1000, 'sent_size_th': 400, 'sh_logit_func': 'tri_linear', 'share_cnn_weights': True, 'share_lstm_weights': True, 'shared_path': 'save/37/shared.json', 'single': False, 'squash': False, 'swap_memory': True, 'test_num_batches': 0, 'use_char_emb': True, 'use_glove_for_unk': True, 'use_word_emb': True, 'val_num_batches': 100, 'var_decay': 0.999, 'vis': False, 'wd': 0.0, 'word_count_th': 10, 'word_emb_size': 100, 'word_size_th': 16, 'word_vocab_size': 1224} Traceback (most recent call last): File "/anaconda/envs/vur/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/anaconda/envs/vur/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/srishti/notebooks/bi-att-flow-demo/basic/cli.py", line 109, in tf.app.run() File "/anaconda/envs/vur/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "/home/srishti/notebooks/bi-att-flow-demo/basic/cli.py", line 106, in main m(config) File "/home/srishti/notebooks/bi-att-flow-demo/basic/main.py", line 27, in main _forward(config) File "/home/srishti/notebooks/bi-att-flow-demo/basic/main.py", line 192, in _forward models = get_multi_gpu_models(config) File "/home/srishti/notebooks/bi-att-flow-demo/basic/model.py", line 19, in get_multi_gpu_models model = Model(config, scope, rep=gpu_idx == 0) File "/home/srishti/notebooks/bi-att-flow-demo/basic/model.py", line 34, in init config.batch_size, config.max_num_sents, config.max_sent_size,
File "/anaconda/envs/vur/lib/python3.5/site-packages/tensorflow/python/platform/flags.py", line 50, in getattr raise AttributeError(name) AttributeError: max_num_sents

0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "/anaconda/envs/vur/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/anaconda/envs/vur/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/srishti/notebooks/bi-att-flow-demo/basic/ensemble.py", line 106, in main() File "/home/srishti/notebooks/bi-att-flow-demo/basic/ensemble.py", line 103, in main ensemble(args) File "/home/srishti/notebooks/bi-att-flow-demo/basic/ensemble.py", line 29, in ensemble e = pickle.load(fh)

EOFError: Ran out of input

srishteeh avatar Jul 17 '18 07:07 srishteeh

@rjonesxmoz @houzhenzhen @srishteeh
The eval.json in directory inter_single is generated after running the process.

I run the command in run_single.sh one by one. After I running the command: (just replace the parameters with the absolute path) python3 -m basic.cli --data_dir inter_single --eval_path inter_single/eval.json --nodump_answer --load_path save/37/save --shared_path save/37/shared.json "" --eval_num_batches 0 --mode forward --batch_size 1 --len_opt --cluster --cpu_opt --load_ema

The file inter_single/eval.json is generated, and it looks like a file wrote in binary form. By the way, the environment is import. My python version is 3.5.2, and the tensorflow version is 0.12.0.

HuiBinR avatar Oct 10 '18 12:10 HuiBinR

I found an eval.json file in this bundle. It is in the inter_single folder.

However I don't understand why this file is needed during evaluation. Also I found that such files are saved during training in out/basic/00/eval/.

valsworthen avatar Nov 19 '18 12:11 valsworthen