You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm receiving an error when calling compute_ricci_curvature in this code snippet:
Gd = nx.Graph()
ricci_edge_index_ = np.array(data.edge_index)
ricci_edge_index = [(ricci_edge_index_[0, i],
ricci_edge_index_[1, i]) for i in
range(np.shape(data.edge_index)[1])]
Gd.add_edges_from(ricci_edge_index)
Gd_OT = OllivierRicci(Gd, alpha=0.5, method="Sinkhorn", verbose="INFO")
print("adding edges finished")
Gd_OT.compute_ricci_curvature()
It breaks in the last line, the trace back as follows:
multiprocessing.pool.RemoteTraceback:
Traceback (most recent call last):
File "/opt/miniconda3/envs/ocp-models/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/opt/miniconda3/envs/ocp-models/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 352, in _wrap_compute_single_edge
return _compute_ricci_curvature_single_edge(*stuff)
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 333, in _compute_ricci_curvature_single_edge
m = _sinkhorn_distance(x, y, d)
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 250, in _sinkhorn_distance
m = ot.sinkhorn2(x, y, d, 1e-1, method='sinkhorn')[0]
IndexError: invalid index to scalar variable.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "pipelines.py", line 99, in <module>
data_cnt)
File "/home/TLC-GNN/baselines/TLCGNN.py", line 106, in call
test_edges_false, name, hop = hop)
File "/home/TLC-GNN/loaddatas.py", line 96, in compute_persistence_image
ricci_cur = compute_ricci_curvature(data)
File "/home/TLC-GNN/loaddatas.py", line 116, in compute_ricci_curvature
Gd_OT.compute_ricci_curvature()
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 766, in compute_ricci_curvature
nbr_topk=self.nbr_topk)
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 504, in _compute_ricci_curvature
edge_ricci = _compute_ricci_curvature_edges(G, weight=weight, **kwargs)
File "/home/.local/lib/python3.6/site-packages/GraphRicciCurvature/OllivierRicci.py", line 475, in _compute_ricci_curvature_edges
for rc in result:
File "/opt/miniconda3/envs/ocp-models/lib/python3.6/multiprocessing/pool.py", line 347, in <genexpr>
return (item for chunk in result for item in chunk)
File "/opt/miniconda3/envs/ocp-models/lib/python3.6/multiprocessing/pool.py", line 735, in next
raise value
IndexError: invalid index to scalar variable.
Any thought about what could be the reason?
The text was updated successfully, but these errors were encountered:
Hello,
I'm new to using GraphRicciCurvature library,
I'm receiving an error when calling
compute_ricci_curvature
in this code snippet:It breaks in the last line, the trace back as follows:
Any thought about what could be the reason?
The text was updated successfully, but these errors were encountered: