class_docstr: A wrapper around HyperOpt to provide trial suggestions.
  
  HyperOpt a Python library for serial and parallel optimization
  over awkward search spaces, which may include real-valued, discrete,
  and conditional dimensions. More info can be found at
  http://hyperopt.github.io/hyperopt.
  
  HyperOptSearch uses the Tree-structured Parzen Estimators algorithm,
  though it can be trivially extended to support any algorithm HyperOpt
  supports.
  
  To use this search algorithm, you will need to install HyperOpt:
  
  .. code-block:: bash
  
      pip install -U hyperopt
  
  
  Parameters:
      space: HyperOpt configuration. Parameters will be sampled
          from this configuration and will be used to override
          parameters generated in the variant generation process.
      metric: The training result objective value attribute. If None
          but a mode was passed, the anonymous metric `_metric` will be used
          per default.
      mode: One of {min, max}. Determines whether objective is
          minimizing or maximizing the metric attribute.
      points_to_evaluate: Initial parameter suggestions to be run
          first. This is for when you already have some good parameters
          you want to run first to help the algorithm make better suggestions
          for future parameters. Needs to be a list of dicts containing the
          configurations.
      n_initial_points: number of random evaluations of the
          objective function before starting to aproximate it with
          tree parzen estimators. Defaults to 20.
      random_state_seed: seed for reproducible
          results. Defaults to None.
      gamma: parameter governing the tree parzen
          estimators suggestion algorithm. Defaults to 0.25.
  
  Tune automatically converts search spaces to HyperOpt's format:
  
  .. code-block:: python
  
      config = {
          'width': tune.uniform(0, 20),
          'height': tune.uniform(-100, 100),
          'activation': tune.choice(["relu", "tanh"])
      }
  
      current_best_params = [{
          'width': 10,
          'height': 0,
          'activation': "relu",
      }]
  
      hyperopt_search = HyperOptSearch(
          metric="mean_loss", mode="min",
          points_to_evaluate=current_best_params)
  
      tuner = tune.Tuner(
          trainable,
          tune_config=tune.TuneConfig(
              search_alg=hyperopt_search
          ),
          param_space=config
      )
      tuner.fit()
  
  If you would like to pass the search space manually, the code would
  look like this:
  
  .. code-block:: python
  
      space = {
          'width': hp.uniform('width', 0, 20),
          'height': hp.uniform('height', -100, 100),
          'activation': hp.choice("activation", ["relu", "tanh"])
      }
  
      current_best_params = [{
          'width': 10,
          'height': 0,
          'activation': "relu",
      }]
  
      hyperopt_search = HyperOptSearch(
          space, metric="mean_loss", mode="min",
          points_to_evaluate=current_best_params)
  
      tuner = tune.Tuner(
          trainable,
          tune_config=tune.TuneConfig(
              search_alg=hyperopt_search
          ),
      )
      tuner.fit()
code: def restore(self, checkpoint_path: str) -> None:
      with open(checkpoint_path, "rb") as f:
          save_object = cloudpickle.load(f)
  
      if "__rstate" not in save_object:
          # Backwards compatibility
          self.set_state(save_object)
      else:
          self.rstate.set_state(save_object.pop("__rstate"))
          self.__dict__.update(save_object)
  
imports: from typing import Any, Dict, List, Optional
  import numpy
  import copy
  import logging
  from functools import partial
  from ray import cloudpickle
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.search.sample import Categorical, Domain, Float, Integer, LogUniform, Normal, Quantized, Uniform
  from ray.tune.search import UNRESOLVED_SEARCH_SPACE, UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, Searcher
  from ray.tune.search.variant_generator import assign_value, parse_spec_vars
  from ray.tune.utils import flatten_dict
  from ray.tune.error import TuneError
label_desc: Use image node_id 14 for calling the HyperOptSearch obj's underlying member method code with example usage: obj.restore(checkpoint_path) without return types