code: def load_records(self):
      print(f"Loading records from {self.work_dir}")
      record_path = self.work_dir.joinpath("records.csv")
      if record_path.exists():
          df = pd.read_csv(record_path, index_col=0)
          for exp_id, record in df.iterrows():
              params = (
                  record.loc[list(self.param_names)]
                  .values.flatten()
                  .tolist()
              )
              params = tuple(
                  eval(x) if isinstance(x, str) else x for x in params
              )
              self.exp_ids[params] = exp_id
              self.records[params] = record.iloc[
                  len(self.param_names) :
              ].to_dict()
          return
      raise RuntimeError(
          "Cannot load previous checkpoint in random search."
      )
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Optional, Dict, Tuple, List, Union
  from collections import OrderedDict
  from pathlib import Path
  from itertools import product
  from functools import reduce
  import traceback
  import textwrap
  import socket
  import json
  import torch
  import numpy
  import pandas
  from .distributed import is_main_process, synchronize
label_desc: Use image node_id 8 for calling the HyperOptManager obj's underlying member method code with example usage: obj.load_records() without return types