microsoft / CodeBERT

CodeBERT
MIT License
2.16k stars 446 forks source link

CodeReviewer缺少preds.txt和golds.txt文件 #214

Open SichongHao opened 1 year ago

SichongHao commented 1 year ago

Hi, run_finetune_msg文件中的第82行:with open(os.path.join(args.model_name_or_path, "preds.txt"), "w", encoding="utf-8") as f:,在huggingface中无法找到preds.txt文件,golds.txt文件也没有找到,请问怎么解决呢?

报错信息如下:FileNotFoundError: [Errno 2] No such file or directory: 'microsoft/codereviewer/preds.txt'

celbree commented 1 year ago

去掉这几行即可,不会对结果产生影响,参考最新的commit https://github.com/microsoft/CodeBERT/commit/84fd94f145bdca434d92e46127f504a4605aac8f

Qinhaifu commented 1 year ago

我在运行test_model.py的时候,遇到报错, Some weights of ReviewerModel were not initialized from the model checkpoint at microsoft/codereviewer and are newly initialized: ['cls_head.bias', 'cls_head.weight'] 请问一下你遇到过吗?如何解决这个问题?