OpenHGNN icon indicating copy to clipboard operation
OpenHGNN copied to clipboard

space4hgnn运行rank.py文件报错

Open Tingting-Liu-star opened this issue 2 years ago • 1 comments

你好,我按照space4hgnn中README文件执行“Run a single experiment”和“Run a batch of experiments”后,在“3.2 Analyze with figures”时,运行rank.py文件时报错,错误信息如下,同时distribution.py文件也会报错。 /home/L/OpenHGNN/space4hgnn/figure/rank.py Traceback (most recent call last): File "/home/L/anaconda3/envs/openhgnn2/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3361, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'subgraph'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/L/OpenHGNN/space4hgnn/figure/rank.py", line 21, in df=df[df['subgraph'] != 'mixed'] File "/home/L/anaconda3/envs/openhgnn2/lib/python3.7/site-packages/pandas/core/frame.py", line 3458, in getitem indexer = self.columns.get_loc(key) File "/home/L/anaconda3/envs/openhgnn2/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc raise KeyError(key) from err KeyError: 'subgraph'

Tingting-Liu-star avatar Jun 04 '22 12:06 Tingting-Liu-star

It is a bug, which is fixed in https://github.com/BUPT-GAMMA/OpenHGNN/commit/f8067afc92443a994f12926a70b9c354171a1cfc. However, it is still hard to use to plot ranking and distribution. We will give some details demos in the future.

Theheavens avatar Jun 06 '22 13:06 Theheavens