class_docstr: Implementation of knowledge graph interface in pglke.
  
  Args:
      triplets (dict):
          Triplet data of knowledge graphs with keys 'train', 'valid' and 'test'.
      num_ents (int, optional):
          Number of entities in a knowledge graph.
          If not provided, it will be inferred from triplets.
      num_rels (int, optional):
          Number of relations in a knowledge graph.
          If not provided, it will be inferred from triplets.
      ent_feat (np.ndarray, optional):
          Entity features, which have consistent order with entity ids.
      rel_feat (np.ndarray, optional):
          Relation features, which have consistent order with relation ids.
docstr: Save all data and load embeddings and features in mmap mode.
          
docstr_tok: ["Save","all","data","and","load","embeddings","and","features","in","mmap","mode","."]
code: def to_mmap(self, path="./tmp"):
      """Save all data and load embeddings and features in mmap mode."""
      self.dump(path)
      new_object = self.load(path)
      self._train = new_object._train
      self._valid = new_object._valid
      self._test = new_object._test
      self._ent_feat = new_object._ent_feat
      self._rel_feat = new_object._rel_feat
  
imports: import os
  import json
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 24 for calling the TriGraph obj's underlying member method code with example usage: obj.to_mmap(path) without return types