RichardHGL / WSDM2021_NSM

Improving Multi-hop Knowledge Base Question Answering by Learning Intermediate Supervision Signals. WSDM 2021.
130 stars 22 forks source link

No such file or directory: 'checkpoint/webqsp_student/../webqsp_teacher/webqsp_hybrid_teacher-final.ckpt' #11

Closed Just-For-Fun77 closed 2 years ago

Just-For-Fun77 commented 2 years ago

为什么目录不会切换至上一层,在windows下的git bash中运行的 FileNotFoundError: [Errno 2] No such file or directory: 'checkpoint/webqsp_student/../webqsp_teacher/webqsp_hybrid_teacher-final.ckpt'

RichardHGL commented 2 years ago

Did you download the ckpt file and name it with the folder name? And all program are assumed to be executed in the bash directory. And if you want to run it from scratch (without pretrained ckpt from our google drive), before run the command for student, you'd first run the command for teacher.

是否下载了相应文件并按照对应目录命名?所有bash应当在给出bash的目录执行. 如果你尝试直接运行,(不从给定google drive下载)进行学生模型的训练前需要先运行教师模型(图中报错文件为教师模型保存的模型)

Just-For-Fun77 commented 2 years ago

ckpt_path = os.path.join(args['checkpoint_dir'], args['load_experiment']) 应该是这段代码的问题,通过在load_experiment文件绝对路径前加 / 解决

RichardHGL commented 2 years ago

Actually, the code is supposed to generate ckpt in the checkpoint folder in the repository. You can also solve it withmkdir checkpoint before runing the command. 你可以先在sh所在目录创建checkpoint文件夹,然后生成的模型会存到相应位置