From 286a8aa8582a701ccd07906f55d504b5c7dd7a30 Mon Sep 17 00:00:00 2001 From: sfluegel Date: Fri, 24 Jul 2026 11:03:44 +0200 Subject: [PATCH] cast ids to string --- chebai_graph/preprocessing/datasets/chebi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chebai_graph/preprocessing/datasets/chebi.py b/chebai_graph/preprocessing/datasets/chebi.py index 2d03876..a83b58e 100644 --- a/chebai_graph/preprocessing/datasets/chebi.py +++ b/chebai_graph/preprocessing/datasets/chebi.py @@ -378,6 +378,7 @@ def load_processed_data( """ base_data = super().load_processed_data(kind, filename) base_df = pd.DataFrame(base_data) + base_df["ident"] = base_df["ident"].astype(str) for property in self.properties: property_data = torch.load( @@ -392,6 +393,7 @@ def load_processed_data( property_df.rename( columns={property.name: f"{property.name}"}, inplace=True ) + property_df["ident"] = property_df["ident"].astype(str) base_df = base_df.merge(property_df, on="ident", how="left") base_df["features"] = base_df.apply( @@ -478,6 +480,7 @@ def load_processed_data( """ base_data = super().load_processed_data(kind, filename) base_df = pd.DataFrame(base_data) + base_df["ident"] = base_df["ident"].astype(str) props_categories = { "AllNodeTypeProperties": [], "FGNodeTypeProperties": [], @@ -538,6 +541,7 @@ def load_processed_data( ) property_df = pd.DataFrame(property_data) + property_df["ident"] = property_df["ident"].astype(str) property_df.rename( columns={property.name: f"{property.name}"}, inplace=True )