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: Instantiates model.
  
  Args:
    param_ranges: Discrete hyperparameter range for random search.
    fixed_params: Fixed model parameters per experiment.
    model_folder: Folder to store optimisation artifacts.
    override_w_fixed_params: Whether to override serialsed fixed model
      parameters with new supplied values.
docstr_tok: ["Instantiates","model",".","Args",":","param_ranges",":","Discrete","hyperparameter","range","for","random","search",".","fixed_params",":","Fixed","model","parameters","per","experiment",".","model_folder",":","Folder","to","store","optimisation","artifacts",".","override_w_fixed_params",":","Whether","to","override","serialsed","fixed","model","parameters","with","new","supplied","values","."]
code: def __init__(
      self,
      param_ranges,
      fixed_params,
      model_folder,
      override_w_fixed_params=True,
  ):
      """Instantiates model.
  
      Args:
        param_ranges: Discrete hyperparameter range for random search.
        fixed_params: Fixed model parameters per experiment.
        model_folder: Folder to store optimisation artifacts.
        override_w_fixed_params: Whether to override serialsed fixed model
          parameters with new supplied values.
      """
  
      self.param_ranges = param_ranges
  
      self._max_tries = 1000
      self.results = pd.DataFrame()
      self.fixed_params = fixed_params
      self.saved_params = pd.DataFrame()
  
      self.best_score = np.Inf
      self.optimal_name = ""
  
      # Setup
      # Create folder for saving if its not there
      self.hyperparam_folder = model_folder
      utils.create_folder_if_not_exist(self.hyperparam_folder)
  
      self._override_w_fixed_params = override_w_fixed_params
  
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 1 to create a new HyperparamOptManager object  with example: obj = HyperparamOptManager(param_ranges, fixed_params, model_folder, override_w_fixed_params)