code: def __init__(self, save_directory, metrics, sort_by_idx=0):
      if isinstance(save_directory, Path):
          self.save_directory = save_directory
      else:
          self.save_directory = Path(save_directory)
  
      self.sort_by_idx = sort_by_idx
  
      # (result_metric1, result_metric2, ..., result_metric_n, epoch, model_nr) -> model path
      self.metrics = OrderedDict(
          {metric.name: metric for metric in metrics}
      )
      self.models = OrderedDict()
  
file_path: small-text/small_text/integrations/pytorch/model_selection.py
imports: import logging
  from collections import OrderedDict
  from pathlib import Path
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.utils.annotations import deprecated
label_desc: Use image node_id 1 to create a new PytorchModelSelection object from inherited base classes: object with example: obj = PytorchModelSelection(save_directory, metrics, sort_by_idx)