class_docstr: Uses Scikit Optimize (skopt) to optimize hyperparameters.
  
  Scikit-optimize is a black-box optimization library.
  Read more here: https://scikit-optimize.github.io.
  
  You will need to install Scikit-Optimize to use this module.
  
  .. code-block:: bash
  
      pip install scikit-optimize
  
  This Search Algorithm requires you to pass in a `skopt Optimizer object
  <https://scikit-optimize.github.io/stable/modules/generated/skopt.Optimizer.html#skopt.Optimizer>`_.
  
  This searcher will automatically filter out any NaN, inf or -inf results.
  
  Parameters:
      optimizer: Optimizer provided
          from skopt.
      space: A dict mapping parameter names to valid parameters,
          i.e. tuples for numerical parameters and lists for categorical
          parameters. If you passed an optimizer instance as the
          `optimizer` argument, this should be a list of parameter names
          instead.
      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.
      evaluated_rewards: If you have previously evaluated the
          parameters passed in as points_to_evaluate you can avoid
          re-running those trials by passing in the reward attributes
          as a list so the optimiser can be told the results without
          needing to re-compute the trial. Must be the same length as
          points_to_evaluate.
      convert_to_python: SkOpt outputs numpy primitives (e.g.
          ``np.int64``) instead of Python types. If this setting is set
          to ``True``, the values will be converted to Python primitives.
  
  Tune automatically converts search spaces to SkOpt's format:
  
  .. code-block:: python
  
      config = {
          "width": tune.uniform(0, 20),
          "height": tune.uniform(-100, 100)
      }
  
      current_best_params = [
          {
              "width": 10,
              "height": 0,
          },
          {
              "width": 15,
              "height": -20,
          }
      ]
  
      skopt_search = SkOptSearch(
          metric="mean_loss",
          mode="min",
          points_to_evaluate=current_best_params)
  
      tuner = tune.Tuner(
          trainable_function,
          tune_config=tune.TuneConfig(
              search_alg=skopt_search
          ),
          param_space=config
      )
      tuner.fit()
  
  If you would like to pass the search space/optimizer manually,
  the code would look like this:
  
  .. code-block:: python
  
      parameter_names = ["width", "height"]
      parameter_ranges = [(0,20),(-100,100)]
      current_best_params = [[10, 0], [15, -20]]
  
      skopt_search = SkOptSearch(
          parameter_names=parameter_names,
          parameter_ranges=parameter_ranges,
          metric="mean_loss",
          mode="min",
          points_to_evaluate=current_best_params)
  
      tuner = tune.Tuner(
          trainable_function,
          tune_config=tune.TuneConfig(
              search_alg=skopt_search
          ),
      )
      tuner.fit()
code: def save(self, checkpoint_path: str):
      save_object = self.__dict__
      with open(checkpoint_path, "wb") as outputFile:
          pickle.dump(save_object, outputFile)
  
imports: import copy
  import logging
  import numpy
  import pickle
  from typing import Dict, List, Optional, Tuple, Union, Any
  from ray.tune.result import DEFAULT_METRIC
  from ray.tune.search.sample import Categorical, Domain, Float, Integer, Quantized, LogUniform
  from ray.tune.search import UNRESOLVED_SEARCH_SPACE, UNDEFINED_METRIC_MODE, UNDEFINED_SEARCH_SPACE, Searcher
  from ray.tune.search.variant_generator import parse_spec_vars
  from ray.tune.utils import flatten_dict
  from ray.tune.utils.util import is_nan_or_inf, unflatten_dict, validate_warmstart
label_desc: Use image node_id 10 for calling the SkOptSearch obj's underlying member method code with example usage: obj.save(checkpoint_path) without return types