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: Dump knowledge graph data into the given directory.
  
  Args:
      path (str):
          Directory for the storage of the knowledge graph.
docstr_tok: ["Dump","knowledge","graph","data","into","the","given","directory",".","Args",":","path","(","str",")",":","Directory","for","the","storage","of","the","knowledge","graph","."]
code: def dump(self, path):
      """
      Dump knowledge graph data into the given directory.
  
      Args:
          path (str):
              Directory for the storage of the knowledge graph.
  
      """
      if not os.path.exists(path):
          os.makedirs(path)
  
      np.save(os.path.join(path, "num_ents.npy"), self._num_ents)
      np.save(os.path.join(path, "num_rels.npy"), self._num_rels)
      np.save(os.path.join(path, "train.npy"), self._train)
      np.save(os.path.join(path, "valid.npy"), self._valid)
      np.save(os.path.join(path, "test.npy"), self._test)
      np.save(os.path.join(path, "ent_feat.npy"), self._ent_feat)
      np.save(os.path.join(path, "rel_feat.npy"), self._rel_feat)
  
imports: import os
  import json
  from collections import defaultdict
  import numpy
label_desc: Use image node_id 6 for calling the TriGraph obj's underlying member method code with example usage: obj.dump(path) without return types