diff --git a/notebooks/0_custom_KG_dataset.ipynb b/notebooks/0_custom_KG_dataset.ipynb index f788047..882ff6e 100644 --- a/notebooks/0_custom_KG_dataset.ipynb +++ b/notebooks/0_custom_KG_dataset.ipynb @@ -11,7 +11,7 @@ "\n", "BESS-KGE (`besskge`) is a PyTorch library for knowledge graph embedding (KGE) models on IPUs implementing the distribution framework [BESS](https://arxiv.org/abs/2211.12281), with embedding tables stored in the IPU SRAM.\n", "\n", - "In this notebook we will show how to use the `besskge.dataset.KGDataset` class to easily pre-process a custom knowledge graph dataset for use with BESS-KGE.\n", + "In this notebook we will show how to use the `besskge.dataset.KGDataset` class to easily preprocess a custom knowledge graph dataset for use with BESS-KGE.\n", "\n", "As an example, we will download and build the [OGBL-BioKG](https://ogb.stanford.edu/docs/linkprop/#ogbl-biokg) biomedical knowledge graph. While BESS-KGE provides a built-in dataloader for this dataset (see [besskge.dataset.KGDataset.build_ogbl_biokg](https://graphcore-research.github.io/bess-kge/generated/besskge.dataset.KGDataset.html#besskge.dataset.KGDataset.build_ogbl_biokg)), in this notebook — for didactic purposes — we will show how to import the dataset from scratch." ] @@ -161,7 +161,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Since the objective here is to show how to build the BESS-KGE `KGDataset` class from scratch, we will not use any of the pre-processing utilities provided by `ogb`. Instead we will use the raw source files directly. To start from the most generic case, we will actually undo some of the preprocessing already performed on the data, namely the mapping from entity labels to entity indices for the different entity types." + "Since the objective here is to show how to build the BESS-KGE `KGDataset` class from scratch, we will not use any of the preprocessing utilities provided by `ogb`. Instead we will use the raw source files directly. To start from the most generic case, we will actually undo some of the preprocessing already performed on the data, namely the mapping from entity labels to entity indices for the different entity types." ] }, { @@ -669,7 +669,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "meaning that the entity with ID 0 is \"C0393778 (disease)\", the entity with ID 1 is \"C2677109 (disease)\", etc. (and similarly for `biokg.relation_dict`).\n", + "meaning that the entity with ID 0 is `biokg.entity_dict[0]`, the entity with ID 1 is `biokg.entity_dict[1]`, etc. (and similarly for `biokg.relation_dict`).\n", "\n", "Let's do a quick sanity check." ]