models icon indicating copy to clipboard operation
models copied to clipboard

训练KT-NET时执行cd reading_comprehension && sh ./run_record_twomemory.sh报错

Open Soulmate303 opened this issue 7 years ago • 4 comments

09/25/2019 14:17:39 - INFO - utils.args - ----------- Configuration Arguments ----------- 09/25/2019 14:17:39 - INFO - utils.args - batch_size: 6 09/25/2019 14:17:39 - INFO - utils.args - bert_config_path: cased_L-24_H-1024_A-16/bert_config.json 09/25/2019 14:17:39 - INFO - utils.args - checkpoints: output/ 09/25/2019 14:17:39 - INFO - utils.args - concept_embedding_path: ../retrieve_concepts/KB_embeddings/wn_concept2vec.txt 09/25/2019 14:17:39 - INFO - utils.args - dev_retrieved_nell_concept_path: ../retrieve_concepts/retrieve_nell/output_record/dev.retrieved_nell_concepts.data 09/25/2019 14:17:39 - INFO - utils.args - do_lower_case: False 09/25/2019 14:17:39 - INFO - utils.args - do_predict: True 09/25/2019 14:17:39 - INFO - utils.args - do_train: True 09/25/2019 14:17:39 - INFO - utils.args - do_val: False 09/25/2019 14:17:39 - INFO - utils.args - doc_stride: 128 09/25/2019 14:17:39 - INFO - utils.args - ema_decay: 0.9999 09/25/2019 14:17:39 - INFO - utils.args - epoch: 4 09/25/2019 14:17:39 - INFO - utils.args - freeze: False 09/25/2019 14:17:39 - INFO - utils.args - in_tokens: False 09/25/2019 14:17:39 - INFO - utils.args - init_checkpoint: None 09/25/2019 14:17:39 - INFO - utils.args - init_pretraining_params: cased_L-24_H-1024_A-16/params 09/25/2019 14:17:39 - INFO - utils.args - learning_rate: 3e-05 09/25/2019 14:17:39 - INFO - utils.args - loss_scaling: 1.0 09/25/2019 14:17:39 - INFO - utils.args - lr_scheduler: linear_warmup_decay 09/25/2019 14:17:39 - INFO - utils.args - max_answer_length: 30 09/25/2019 14:17:39 - INFO - utils.args - max_query_length: 64 09/25/2019 14:17:39 - INFO - utils.args - max_seq_len: 384 09/25/2019 14:17:39 - INFO - utils.args - n_best_size: 20 09/25/2019 14:17:39 - INFO - utils.args - null_score_diff_threshold: 0.0 09/25/2019 14:17:39 - INFO - utils.args - num_iteration_per_drop_scope: 1 09/25/2019 14:17:39 - INFO - utils.args - predict_file: ../data//ReCoRD/dev.json 09/25/2019 14:17:39 - INFO - utils.args - random_seed: 45 09/25/2019 14:17:39 - INFO - utils.args - retrieved_synset_path: ../retrieve_concepts/retrieve_wordnet/output_record/retrived_synsets.data 09/25/2019 14:17:39 - INFO - utils.args - save_steps: 4000 09/25/2019 14:17:39 - INFO - utils.args - skip_steps: 10 09/25/2019 14:17:39 - INFO - utils.args - train_file: ../data//ReCoRD/train.json 09/25/2019 14:17:39 - INFO - utils.args - train_retrieved_nell_concept_path: ../retrieve_concepts/retrieve_nell/output_record/train.retrieved_nell_concepts.data 09/25/2019 14:17:39 - INFO - utils.args - use_cuda: True 09/25/2019 14:17:39 - INFO - utils.args - use_ema: True 09/25/2019 14:17:39 - INFO - utils.args - use_fast_executor: False 09/25/2019 14:17:39 - INFO - utils.args - use_fp16: False 09/25/2019 14:17:39 - INFO - utils.args - use_nell: False 09/25/2019 14:17:39 - INFO - utils.args - use_wordnet: True 09/25/2019 14:17:39 - INFO - utils.args - validation_steps: 1000 09/25/2019 14:17:39 - INFO - utils.args - verbose: False 09/25/2019 14:17:39 - INFO - utils.args - version_2_with_negative: False 09/25/2019 14:17:39 - INFO - utils.args - vocab_path: cased_L-24_H-1024_A-16/vocab.txt 09/25/2019 14:17:39 - INFO - utils.args - warmup_proportion: 0.1 09/25/2019 14:17:39 - INFO - utils.args - weight_decay: 0.01 09/25/2019 14:17:39 - INFO - utils.args - ------------------------------------------------ 09/25/2019 14:17:39 - INFO - model.bert - attention_probs_dropout_prob: 0.1 09/25/2019 14:17:39 - INFO - model.bert - directionality: bidi 09/25/2019 14:17:39 - INFO - model.bert - hidden_act: gelu 09/25/2019 14:17:39 - INFO - model.bert - hidden_dropout_prob: 0.1 09/25/2019 14:17:39 - INFO - model.bert - hidden_size: 1024 09/25/2019 14:17:39 - INFO - model.bert - initializer_range: 0.02 09/25/2019 14:17:39 - INFO - model.bert - intermediate_size: 4096 09/25/2019 14:17:39 - INFO - model.bert - max_position_embeddings: 512 09/25/2019 14:17:39 - INFO - model.bert - num_attention_heads: 16 09/25/2019 14:17:39 - INFO - model.bert - num_hidden_layers: 24 09/25/2019 14:17:39 - INFO - model.bert - pooler_fc_size: 768 09/25/2019 14:17:39 - INFO - model.bert - pooler_num_attention_heads: 12 09/25/2019 14:17:39 - INFO - model.bert - pooler_num_fc_layers: 3 09/25/2019 14:17:39 - INFO - model.bert - pooler_size_per_head: 128 09/25/2019 14:17:39 - INFO - model.bert - pooler_type: first_token_transform 09/25/2019 14:17:39 - INFO - model.bert - type_vocab_size: 2 09/25/2019 14:17:39 - INFO - model.bert - vocab_size: 28996 09/25/2019 14:17:39 - INFO - model.bert - ------------------------------------------------ Traceback (most recent call last): File "src/run_record.py", line 594, in train(args) File "src/run_record.py", line 332, in train max_query_length=args.max_query_length) File "/home/KTNET/ACL2019-KTNET/reading_comprehension/src/reader/record.py", line 538, in init vocab_file=vocab_path, do_lower_case=do_lower_case) File "/home/KTNET/ACL2019-KTNET/reading_comprehension/src/tokenization.py", line 113, in init self.vocab = load_vocab(vocab_file) File "/home/KTNET/ACL2019-KTNET/reading_comprehension/src/tokenization.py", line 73, in load_vocab for num, line in enumerate(fin): File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 1323: ordinal not in range(128)

Soulmate303 avatar Sep 26 '19 03:09 Soulmate303

这个问题和python环境有关,请参考这里

https://stackoverflow.com/questions/18649512/unicodedecodeerror-ascii-codec-cant-decode-byte-0xe2-in-position-13-ordinal

kuke avatar Sep 26 '19 05:09 kuke

好的,感谢,我看看

Soulmate303 avatar Sep 26 '19 06:09 Soulmate303

之后我再执行的时候,报的以下错误,而服务器上的内存是够用的,不知道是代码的原因造成的还是其他? Traceback (most recent call last): File "src/run_record_twomemory.py", line 626, in train(args) File "src/run_record_twomemory.py", line 549, in train outputs = train_exe.run(fetch_list=fetch_list) File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/parallel_executor.py", line 279, in run return_numpy=return_numpy) File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/executor.py", line 617, in run six.reraise(*sys.exc_info()) File "/usr/local/lib/python3.5/dist-packages/six.py", line 693, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/executor.py", line 613, in run use_program_cache=use_program_cache) File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/executor.py", line 666, in _run_impl return_numpy=return_numpy) File "/usr/local/lib/python3.5/dist-packages/paddle/fluid/executor.py", line 536, in _run_parallel tensors = exe.run(fetch_var_names)._move_to_list() RuntimeError: Cannot malloc 1269.353760 MB GPU memory. Please shrink FLAGS_fraction_of_gpu_memory_to_use or FLAGS_initial_gpu_memory_in_mb or FLAGS_reallocate_gpu_memory_in_mb environment variable to a lower value. Current FLAGS_fraction_of_gpu_memory_to_use value is 0.920000. Current FLAGS_initial_gpu_memory_in_mb value is 0. Current FLAGS_reallocate_gpu_memory_in_mb value is 0 at [/paddle/paddle/fluid/memory/detail/system_allocator.cc:133]

Soulmate303 avatar Sep 26 '19 06:09 Soulmate303

这个可能是显存分配策略得问题,可以按照错误提示里面的建议,把环境变量FLAGS_fraction_of_gpu_memory_to_use设置成0试试

yangapku avatar Oct 07 '19 09:10 yangapku