apoorvumang / CronKGQA

ACL 2021: Question Answering over Temporal Knowledge Graphs
MIT License
92 stars 19 forks source link

I cannot find some files(embedkgqa_dual_frozen_lm_fix_order_ce.ckpt) #15

Open HLiang-Lee opened 1 year ago

HLiang-Lee commented 1 year ago

Hello sir. When I run the notebook, some errors happened. The question I want to ask is 'tcomplex_ 17dec.ckpt' and 'tkbc_17dec.ckpt' the same. The 'tcomplex_17dec.ckpt' is in the folder 'models'. While 'tkbc_17dec.ckpt' is required in the notebook.

FileNotFoundError                         Traceback (most recent call last)
/home/v_lihongliang/CronKGQA/cronkgqa_testing.ipynb Cell 6 in <cell line: 8>()
      [3](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=2) filename = 'models/{dataset_name}/qa_models/{model_file}.ckpt'.format(
      [4](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=3)     dataset_name=dataset_name,
      [5](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=4)     model_file='embedkgqa_dual_frozen_lm_fix_order_ce'
      [6](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=5) )
      [7](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=6) print('Loading model from', filename)
----> [8](/CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=7) qa_model.load_state_dict(torch.load(filename))
      [9](CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=8) print('Loaded qa model from ', filename)
     [10](/CronKGQA/cronkgqa_testing.ipynb#W5sdnNjb2RlLXJlbW90ZQ%3D%3D?line=9) qa_model = qa_model.cuda()

File ~/CronKGQA/cronkgqa_env/lib/python3.8/site-packages/torch/serialization.py:699, in load(f, map_location, pickle_module, **pickle_load_args)
    696 if 'encoding' not in pickle_load_args.keys():
    697     pickle_load_args['encoding'] = 'utf-8'
--> 699 with _open_file_like(f, 'rb') as opened_file:
    700     if _is_zipfile(opened_file):
    701         # The zipfile reader is going to advance the current file position.
    702         # If we want to actually tail call to torch.jit.load, we need to
    703         # reset back to the original position.
    704         orig_position = opened_file.tell()

File ~/CronKGQA/cronkgqa_env/lib/python3.8/site-packages/torch/serialization.py:230, in _open_file_like(name_or_buffer, mode)
    228 def _open_file_like(name_or_buffer, mode):
    229     if _is_path(name_or_buffer):
...
File ~/CronKGQA/cronkgqa_env/lib/python3.8/site-packages/torch/serialization.py:211, in _open_file.__init__(self, name, mode)
    210 def __init__(self, name, mode):
--> 211     super(_open_file, self).__init__(open(name, mode))

FileNotFoundError: [Errno 2] No such file or directory: 'models/wikidata_big/qa_models/embedkgqa_dual_frozen_lm_fix_order_ce.ckpt'