Thanks for your great work. When I preprocessed csqa, I have met this error:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/data/xuanlong/anaconda3/envs/greaselm/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/data/xuanlong/Graph2Text/GreaseLM/preprocess_utils/graph.py", line 337, in concepts_to_adj_matrices_2hop_all_pair__use_LM__Part3
adj, concepts = concepts2adj(schema_graph)
File "/data/xuanlong/Graph2Text/GreaseLM/preprocess_utils/graph.py", line 128, in concepts2adj
adj = coo_matrix(adj.reshape(-1, n_node))
ValueError: cannot reshape array of size 0 into shape (0)
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "preprocess.py", line 131, in <module>
main()
File "preprocess.py", line 125, in main
rt_dic['func'](*rt_dic['args'])
File "/data/xuanlong/Graph2Text/GreaseLM/preprocess_utils/graph.py", line 512, in generate_adj_data_from_grounded_concepts__use_LM
res3 = list(tqdm(p.imap(concepts_to_adj_matrices_2hop_all_pair__use_LM__Part3, res2), total=len(res2)))
File "/data/xuanlong/anaconda3/envs/greaselm/lib/python3.8/site-packages/tqdm/std.py", line 1180, in __iter__
for obj in iterable:
File "/data/xuanlong/anaconda3/envs/greaselm/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
ValueError: cannot reshape array of size 0 into shape (0)
I have tried to fix it by editing the line https://github.com/snap-stanford/GreaseLM/blob/803946bba3273556c1ff2be6ad8b02850fe5972d/preprocess_utils/graph.py#L128 to just ignore the reshape method if the array has size 0:
Hi Xikun @XikunZhang ,
Thanks for your great work. When I preprocessed csqa, I have met this error:
I have tried to fix it by editing the line
https://github.com/snap-stanford/GreaseLM/blob/803946bba3273556c1ff2be6ad8b02850fe5972d/preprocess_utils/graph.py#L128
to just ignore the reshape method if the array has size 0:I think that I edited in an incorrect way because when running evaluation, I got this error:
Is it possible that you could give me some advices on how I can fix it (the first error).
Thank you & BR,