class_docstr: Manages hyperparameter optimisation using random search for a single GPU.
  
  Attributes:
    param_ranges: Discrete hyperparameter range for random search.
    results: Dataframe of validation results.
    fixed_params: Fixed model parameters per experiment.
    saved_params: Dataframe of parameters trained.
    best_score: Minimum validation loss observed thus far.
    optimal_name: Key to best configuration.
    hyperparam_folder: Where to save optimisation outputs.
class_docstr_tok: ["Manages","hyperparameter","optimisation","using","random","search","for","a","single","GPU",".","Attributes",":","param_ranges",":","Discrete","hyperparameter","range","for","random","search",".","results",":","Dataframe","of","validation","results",".","fixed_params",":","Fixed","model","parameters","per","experiment",".","saved_params",":","Dataframe","of","parameters","trained",".","best_score",":","Minimum","validation","loss","observed","thus","far",".","optimal_name",":","Key","to","best","configuration",".","hyperparam_folder",":","Where","to","save","optimisation","outputs","."]
docstr: Loads results from previous hyperparameter optimisation.
  
  Returns:
    A boolean indicating if previous results can be loaded.
docstr_tok: ["Loads","results","from","previous","hyperparameter","optimisation",".","Returns",":","A","boolean","indicating","if","previous","results","can","be","loaded","."]
code: def load_results(self):
      """Loads results from previous hyperparameter optimisation.
  
      Returns:
        A boolean indicating if previous results can be loaded.
      """
      print("Loading results from", self.hyperparam_folder)
  
      results_file = os.path.join(self.hyperparam_folder, "results.csv")
      params_file = os.path.join(self.hyperparam_folder, "params.csv")
  
      if os.path.exists(results_file) and os.path.exists(params_file):
          self.results = pd.read_csv(results_file, index_col=0)
          self.saved_params = pd.read_csv(params_file, index_col=0)
  
          if not self.results.empty:
              self.results.at["loss"] = self.results.loc["loss"].apply(
                  float
              )
              self.best_score = self.results.loc["loss"].min()
  
              is_optimal = self.results.loc["loss"] == self.best_score
              self.optimal_name = self.results.T[is_optimal].index[0]
  
              return True
  
      return False
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import shutil
  import libs.utils
  import numpy
  import pandas
label_desc: Use image node_id 2 for calling the HyperparamOptManager obj's underlying member method code with example usage: obj.load_results() and returns: False, True