Skip to content

Commit b83e5cd

Browse files
committed
chebi: use spilt file to create new data class
1 parent c05b868 commit b83e5cd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tutorials/data_exploration_chebi.ipynb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,22 @@
840840
"The `splits.csv` file contains the saved data splits from previous runs, including the train, validation, and test sets. During subsequent runs, this file is used to reconstruct these splits by filtering the encoded data (`data.pt`) based on the IDs stored in `splits.csv`. This ensures consistency and reproducibility in data splitting, allowing for reliable evaluation and comparison of model performance across different run.\n"
841841
]
842842
},
843+
{
844+
"cell_type": "code",
845+
"execution_count": 5,
846+
"id": "6dc3fd6c-7cf6-47ef-812f-54319a0cdeb9",
847+
"metadata": {},
848+
"outputs": [],
849+
"source": [
850+
"# You can specify a literal path for the `splits_file_path`, or if another `chebi_class` instance is already defined, \n",
851+
"# you can use its existing `splits_file_path` attribute for consistency.\n",
852+
"chebi_class_with_splits = ChEBIOver50(\n",
853+
" chebi_version=231, \n",
854+
" # splits_file_path=\"data/chebi_v231/ChEBI50/processed/splits.csv\", # Literal path option\n",
855+
" splits_file_path=chebi_class.splits_file_path # Use path from an existing `chebi_class` instance\n",
856+
")"
857+
]
858+
},
843859
{
844860
"cell_type": "markdown",
845861
"id": "a5eb482c-ce5b-4efc-b2ec-85ac7b1a78ee",

0 commit comments

Comments
 (0)