salesforce / rng-kbqa

BSD 3-Clause "New" or "Revised" License
112 stars 15 forks source link

urllib.error.URLError #16

Open FuHan77 opened 2 years ago

FuHan77 commented 2 years ago
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX : <http://rdf.freebase.com/ns/> 
    SELECT (?x0 AS ?label) WHERE {
    SELECT DISTINCT ?x0  WHERE {
    :m.03_r3 rdfs:label ?x0 . 
                        FILTER (langMatches( lang(?x0), "EN" ) )
                         }
                         }

Reading: 0%|

except urllib.error.URLError:
    print(query)
    exit(0)

After throwing this exception, the program will exit directly. These three websites seem to be inaccessible. What is the situation? Is there an alternative if it is not accessible?

xiye17 commented 2 years ago

I wonder if you've set up the Freebase following the Freehases Setup in Readme.

FuHan77 commented 2 years ago

我想知道您是否按照自述文件中的 Freehases 设置设置了 Freebase。

Thank you for your reply. I have started the Setup of the Freehases as described in your readme file, and then a new problem occurred

08/30/2022 14:54:33 - INFO - main - Loading checkpoint checkpoints/webqsp_bert_ranking for evaluation 08/30/2022 14:54:33 - INFO - main - Evaluate the following checkpoints: ['checkpoints/webqsp_bert_ranking'] 08/30/2022 14:54:34 - INFO - main - Creating features from dataset file at . Reading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1639/1639 [00:43<00:00, 37.62it/s] Indexing: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1626/1626 [37:09<00:00, 1.37s/it] 08/30/2022 15:32:37 - INFO - main - Saving features into cached file feature_cache/webqsp_test_ranking_bert_vanilla_96 Killed cp: 无法获取'results/ranker/webqsp_test/candidate_logits.bin' 的文件状态(stat): 没有那个文件或目录 cp: 无法获取'results/ranker/webqsp_test/predictions.txt' 的文件状态(stat): 没有那个文件或目录

The process was killed after the feature was extracted,and then re-run

Traceback (most recent call last): File "run_ranker.py", line 479, in main() File "run_ranker.py", line 468, in main result = evaluate(args, model, tokenizer, output_prediction=True) File "run_ranker.py", line 304, in evaluate dataset = load_and_cache_rank_examples(args, tokenizer, evaluate=True) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 106, in load_and_cache_rank_examples return webqsp_load_and_cache_rank_examples(args, tokenizer, evaluate=evaluate) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 75, in webqsp_load_and_cache_rank_examples features = torch.load(cached_features_file) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) EOFError: Ran out of input

I hope you can answer your questions and thank you again for your reply

FuHan77 commented 2 years ago

我想知道您是否按照自述文件中的 Freehases 设置设置了 Freebase。

Thank you for your reply. I have started the Setup of the Freehases as described in your readme file, and then a new problem occurred

08/30/2022 14:54:33 - INFO - main - Loading checkpoint checkpoints/webqsp_bert_ranking for evaluation 08/30/2022 14:54:33 - INFO - main - Evaluate the following checkpoints: ['checkpoints/webqsp_bert_ranking'] 08/30/2022 14:54:34 - INFO - main - Creating features from dataset file at . Reading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1639/1639 [00:43<00:00, 37.62it/s] Indexing: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1626/1626 [37:09<00:00, 1.37s/it] 08/30/2022 15:32:37 - INFO - main - Saving features into cached file feature_cache/webqsp_test_ranking_bert_vanilla_96 Killed cp: 无法获取'results/ranker/webqsp_test/candidate_logits.bin' 的文件状态(stat): 没有那个文件或目录 cp: 无法获取'results/ranker/webqsp_test/predictions.txt' 的文件状态(stat): 没有那个文件或目录

The process was killed after the feature was extracted,and then re-run

Traceback (most recent call last): File "run_ranker.py", line 479, in main() File "run_ranker.py", line 468, in main result = evaluate(args, model, tokenizer, output_prediction=True) File "run_ranker.py", line 304, in evaluate dataset = load_and_cache_rank_examples(args, tokenizer, evaluate=True) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 106, in load_and_cache_rank_examples return webqsp_load_and_cache_rank_examples(args, tokenizer, evaluate=evaluate) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 75, in webqsp_load_and_cache_rank_examples features = torch.load(cached_features_file) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) EOFError: Ran out of input

08/30/2022 15:42:29 - INFO - main - Loading features from cached file feature_cache/webqsp_test_ranking_bert_vanilla_96

And I found that the feature file I had saved was empty

xiye17 commented 2 years ago

Seems the feature file is not saved. Could you check 1) if the feature cache folder exists 2) the cpu memory usage. This could be due to insufficient cpu memory while creating abd caching the feature.

anshen666 commented 1 year ago

我想知道您是否按照自述文件中的 Freehases 设置设置了 Freebase。

Thank you for your reply. I have started the Setup of the Freehases as described in your readme file, and then a new problem occurred 08/30/2022 14:54:33 - INFO - main - Loading checkpoint checkpoints/webqsp_bert_ranking for evaluation 08/30/2022 14:54:33 - INFO - main - Evaluate the following checkpoints: ['checkpoints/webqsp_bert_ranking'] 08/30/2022 14:54:34 - INFO - main - Creating features from dataset file at . Reading: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1639/1639 [00:43<00:00, 37.62it/s] Indexing: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1626/1626 [37:09<00:00, 1.37s/it] 08/30/2022 15:32:37 - INFO - main - Saving features into cached file feature_cache/webqsp_test_ranking_bert_vanilla_96 Killed cp: 无法获取'results/ranker/webqsp_test/candidate_logits.bin' 的文件状态(stat): 没有那个文件或目录 cp: 无法获取'results/ranker/webqsp_test/predictions.txt' 的文件状态(stat): 没有那个文件或目录 The process was killed after the feature was extracted,and then re-run Traceback (most recent call last): File "run_ranker.py", line 479, in main() File "run_ranker.py", line 468, in main result = evaluate(args, model, tokenizer, output_prediction=True) File "run_ranker.py", line 304, in evaluate dataset = load_and_cache_rank_examples(args, tokenizer, evaluate=True) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 106, in load_and_cache_rank_examples return webqsp_load_and_cache_rank_examples(args, tokenizer, evaluate=evaluate) File "/media/dell/DATA/workspace/rng-kbqa-main/framework/components/rank_dataset_manager.py", line 75, in webqsp_load_and_cache_rank_examples features = torch.load(cached_features_file) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, pickle_load_args) File "/media/dell/DATA/anconda3/conda/envs/rng/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, pickle_load_args) EOFError: Ran out of input

08/30/2022 15:42:29 - INFO - main - Loading features from cached file feature_cache/webqsp_test_ranking_bert_vanilla_96

And I found that the feature file I had saved was empty

你好我想和你交流一下RNG-KBQA这个项目,不知道你放不方便留个联系方式呢?万分感谢!