class_docstr: A loader via torch.load.
class_docstr_tok: ["A","loader","via","torch.load","."]
docstr: Save tokenization to path.
  
  :param path:
      the output path
  :param order: shape: (num_entities, num_anchors)
      the sorted `anchor_ids`' ids per entity
  :param anchor_ids: shape: (num_anchors,)
      the anchor entity IDs
docstr_tok: ["Save","tokenization","to","path",".",":","param","path",":","the","output","path",":","param","order",":","shape",":","(","num_entities",",","num_anchors",")","the","sorted","`","anchor_ids","`","'","ids","per","entity",":","param","anchor_ids",":","shape",":","(","num_anchors",",",")","the","anchor","entity","IDs"]
code: def save(
      path: pathlib.Path,
      order: numpy.ndarray,
      anchor_ids: numpy.ndarray,
  ) -> None:
      """
      Save tokenization to path.
  
      :param path:
          the output path
      :param order: shape: (num_entities, num_anchors)
          the sorted `anchor_ids`' ids per entity
      :param anchor_ids: shape: (num_anchors,)
          the anchor entity IDs
      """
      # ensure parent directory exists
      path.parent.mkdir(parents=True, exist_ok=True)
      # save via torch.save
      torch.save(
          {
              "order": order,
              "anchors": anchor_ids,  # ignored for now
          },
          path,
      )
  
file_path: pykeen/src/pykeen/nn/node_piece/loader.py
imports: import logging
  import pathlib
  import pickle
  from abc import ABC, abstractmethod
  from typing import Collection, Mapping, Tuple
  import numpy
  import torch
  from class_resolver import ClassResolver
  from tqdm.auto import tqdm
label_desc: Use image node_id 1 for calling the TorchPrecomputedTokenizerLoader obj's underlying member method code with example usage: obj.save(path, order, anchor_ids) without return types