class_docstr: saves a checkpoint after each epoch as 'last_state' (can be loaded to continue interrupted training).
  saves the top-k (k=cf.save_n_models) ranked epochs. In inference, predictions of multiple epochs can be ensembled to improve performance.
class_docstr_tok: ["saves","a","checkpoint","after","each","epoch","as","'last_state","'","(","can","be","loaded","to","continue","interrupted","training",")",".","saves","the","top-k","(","k=cf.save_n_models",")","ranked","epochs",".","In","inference",",","predictions","of","multiple","epochs","can","be","ensembled","to","improve","performance","."]
code: def __init__(self, cf, logger):
      self.cf = cf
      self.saved_epochs = [-1] * cf.save_n_models
      self.logger = logger
  
imports: import numpy
  import logging
  import subprocess
  import os
  import torch
  from collections import OrderedDict
  import plotting
  import sys
  import importlib.util
  import pandas
  import pickle
label_desc: Use image node_id 1 to create a new ModelSelector object  with example: obj = ModelSelector(cf, logger)