Skip to content

Commit d5d382c

Browse files
committed
hack on ogbn-proteins loading
1 parent 862b239 commit d5d382c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ogb/io/read_graph_raw.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ def read_csv_graph_raw(raw_dir, add_inverse_edge = False, additional_node_files
6262
additional_node_info = {}
6363
for additional_file in additional_node_files:
6464
assert(additional_file[:5] == 'node_')
65+
66+
# hack for ogbn-proteins
67+
if additional_file == 'node_species' and osp.exists(osp.join(raw_dir, 'species.csv.gz')):
68+
os.rename(osp.join(raw_dir, 'species.csv.gz'), osp.join(raw_dir, 'node_species.csv.gz'))
69+
6570
temp = pd.read_csv(osp.join(raw_dir, additional_file + '.csv.gz'), compression='gzip', header = None).values
6671

6772
if 'int' in str(temp.dtype):
@@ -322,7 +327,7 @@ def read_csv_heterograph_raw(raw_dir, add_inverse_edge = False, additional_node_
322327

323328
for nodetype in nodetype_list:
324329
subdir = osp.join(raw_dir, 'node-feat', nodetype)
325-
330+
326331
try:
327332
node_feat = pd.read_csv(osp.join(subdir, additional_file + '.csv.gz'), compression='gzip', header = None).values
328333
if 'int' in str(node_feat.dtype):

0 commit comments

Comments
 (0)