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

关于 data cache 生成的问题 #36

Open
Youggls opened this issue Nov 5, 2021 · 0 comments
Open

关于 data cache 生成的问题 #36

Youggls opened this issue Nov 5, 2021 · 0 comments

Comments

@Youggls
Copy link

Youggls commented Nov 5, 2021

尊敬的作者您好
关于每个数据集中生成的缓存文件 kb_cache.json m2n_cache.json query_cache.json,我有些小小的疑问

在您的代码文件 code/KBQA_Runner.py 中的 701-705 行,有这样几行被注释掉的代码:

model_to_save = policy.module if hasattr(policy, 'module') else policy
torch.save(model_to_save.state_dict(), save_model_file)
Save_KB_Files(convert_json_to_save(KB), save_kb_cache)
Save_KB_Files(M2N, save_m2n_cache)
Save_KB_Files(list(QUERY), save_query_cache)

在我看来,这是在训练过程中动态生成以上三个缓存文件,然后将其保存。

但是当我在使用我本人的数据集(非freebase)时,训练过程中生成的这三个文件确是空的,是否需要用其他方式手动初始化?

十分期待您的回复,非常感谢!

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

1 participant