Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metrics.py中compute_predictions_logits函数无法找到指定文件夹或文件 #38

Open
LAnselet opened this issue Jul 20, 2021 · 1 comment

Comments

@LAnselet
Copy link

  • INFO - metrics - Writing predictions to: ./predictions_test_./du2021/384_bert/.json
    Traceback (most recent call last):
    File "main_bert.py", line 1036, in
    main()
    File "main_bert.py", line 1030, in main
    evaluate(args, model, tokenizer, prefix='test', step=global_step)
    File "main_bert.py", line 509, in evaluate
    tokenizer
    File "/nfs/users/sunyichen/data/MRC_Competition_Dureader/main/metrics.py", line 730, in compute_predictions_logits
    with open(output_prediction_file, "w", encoding='utf-8') as writer:
    FileNotFoundError: [Errno 2] No such file or directory: './du2021/384_bert/predictions_test_./du2021/384_bert/.json'1 - INFO - metrics - Writing nbest to: ./du2021/384_bert/nbest_predictions_test_./du2021/384_bert/.json
@kakuibeyond
Copy link

把test_bert.sh里面的model_name_or_path参数最后的/去掉即可,这里是在取step的时候把后面的符号/也取进去了,所以在字符串拼接的时候拼成了....st_./du2021/384_bert/.json的形式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants