Pandas 2.0.0 was released today. A new argument called dtype_backend was added to the read_csv() function that appears to affect the default behavior when reading null values.
When the master.csv files are read with Pandas 2.0.0, the string value "None"now appears to be parsed by default to NaN. This is problematic in places where the meta_info dictionary's properties additional edge files and additional node files are checked to be "None".
see lines 106 and 111 in ogb/linkpropped/dataset.py:
if self.meta_info['additional node files'] == 'None':
additional_node_files = []
else:
additional_node_files = self.meta_info['additional node files'].split(',')
The .split(",") function called on these will throw AttributeError: 'float' object has no attribute 'split'.
The easiest way to fix this in the latest version that preserved compatibility with previous versions was to add keep_default_na=False when the csvs are read.
Also very minor fix of inconsistency of the has_edge_attr property of the ogbl-vessel dataset, which was set to False in the make_master_file.py but is True in the latest csv file committed here.
Revision from previous closed PR
Pandas 2.0.0 was released today. A new argument called
dtype_backend
was added to theread_csv()
function that appears to affect the default behavior when reading null values.When the
master.csv
files are read with Pandas 2.0.0, the string value"None"
now appears to be parsed by default toNaN
. This is problematic in places where themeta_info
dictionary's propertiesadditional edge files
andadditional node files
are checked to be"None"
.see lines 106 and 111 in ogb/linkpropped/dataset.py:
The easiest way to fix this in the latest version that preserved compatibility with previous versions was to add
keep_default_na=False
when the csvs are read.Also very minor fix of inconsistency of the
has_edge_attr
property of theogbl-vessel
dataset, which was set toFalse
in themake_master_file.py
but is True in the latest csv file committed here.