class_docstr: The OGB BioKG dataset.
  
  .. seealso:: https://ogb.stanford.edu/docs/linkprop/#ogbl-biokg
  
  ---
  name: OGB BioKG
  citation:
      author: Hu
      year: 2020
      link: https://arxiv.org/abs/2005.00687
  statistics:
      entities: 93773
      relations: 51
      training: 4762677
      testing: 162870
      validation: 162886
      triples: 5088434
class_docstr_tok: ["The","OGB","BioKG","dataset",".","..","seealso",":",":","https",":","\/\/ogb.stanford.edu\/docs\/linkprop\/","#","ogbl-biokg","--","-","name",":","OGB","BioKG","citation",":","author",":","Hu","year",":","2020","link",":","https",":","\/\/arxiv.org\/abs\/2005.00687","statistics",":","entities",":","93773","relations",":","51","training",":","4762677","testing",":","162870","validation",":","162886","triples",":","5088434"]
code: def _load_mappings(
      self, mapping_root: pathlib.Path
  ) -> tuple[EntityMapping, RelationMapping]:  # noqa: D102
      df_rel = pandas.read_csv(
          mapping_root.joinpath("relidx2relname.csv.gz")
      )
      LOGGER.info(
          f"Loaded relation mapping for {len(df_rel)} relations."
      )
      relation_to_id = dict(
          zip(df_rel["rel name"].tolist(), df_rel["rel idx"].tolist())
      )
  
      # entity mappings are separate for each node type -> combine
      entity_mapping_df = pandas.concat(
          [
              load_partial_entity_mapping(
                  mapping_root=mapping_root, node_type=node_type
              )
              for node_type in NODE_TYPES
          ],
          ignore_index=True,
      ).sort_values(by=["entity_type", "entity_name"])
      entity_mapping_df["name"] = (
          entity_mapping_df["entity_type"]
          + ":"
          + entity_mapping_df["entity_name"]
      )
      # convert entity_name to categorical for fast joins
      entity_mapping_df["entity_type"] = entity_mapping_df[
          "entity_type"
      ].astype("category")
      entity_mapping_df = entity_mapping_df.reset_index(drop=False)
      LOGGER.info(
          f"Merged entity labels for {len(entity_mapping_df)} entities across {len(NODE_TYPES)} node types."
      )
  
      # we need the entity dataframe for fast re-mapping later on
      self.df_ent = entity_mapping_df[
          ["index", "local_entity_id", "entity_type"]
      ]
  
      entity_to_id = dict(
          zip(
              entity_mapping_df["name"].tolist(),
              entity_mapping_df["index"].tolist(),
          )
      )
  
      return entity_to_id, relation_to_id
  
imports: from __future__ import annotations
  import abc
  import logging
  import pathlib
  import typing
  from typing import ClassVar, Generic, Literal, Optional, Sequence, TypedDict, TypeVar, Union, cast, overload
  import click
  import numpy
  import pandas
  import torch
  from docdata import parse_docdata
  from more_click import verbose_option
  from .base import LazyDataset
  from ..triples import TriplesFactory
  from ..typing import EntityMapping, RelationMapping
label_desc: Use image node_id 1 for calling the OGBBioKG obj's underlying member method code with example usage: obj._load_mappings(mapping_root) and returns: entity_to_id,  relation_to_id