class_docstr: Tune driver
docstr: Run trials
  :return: trials result
docstr_tok: ["Run","trials",":","return",":","trials","result"]
code: def run(self):
      """
      Run trials
      :return: trials result
      """
      metric = self.metric_name if not self._scheduler else None
      mode = self.mode if not self._scheduler else None
      analysis = tune.run(
          self.train_func,
          local_dir=self.logs_dir,
          metric=metric,
          mode=mode,
          name=self.name,
          stop=self.stopper,
          config=self.search_space,
          search_alg=self._search_alg,
          num_samples=self.num_samples,
          trial_dirname_creator=trial_dirname_creator,
          callbacks=[CustomProgressCallback()],
          scheduler=self._scheduler,
          resources_per_trial=self.resources_per_trial,
          verbose=3,
          reuse_actors=True,
      )
      self.trials = analysis.trials
  
      # Visualization code for ray (leaderboard)
      try:
          from bigdl.orca.automl.search.tensorboardlogger import (
              TensorboardLogger,
          )
  
          logger_name = self.name if self.name else DEFAULT_LOGGER_NAME
          (
              tf_config,
              tf_metric,
          ) = TensorboardLogger._ray_tune_searcher_log_adapt(analysis)
  
          self.logger = TensorboardLogger(
              logs_dir=os.path.join(
                  self.logs_dir, logger_name + "_leaderboard"
              ),
              name=logger_name,
          )
          self.logger.run(tf_config, tf_metric)
          self.logger.close()
      except ImportError:
          import warnings
  
          warnings.warn(
              "torch >= 1.7.0 should be installed to enable the orca.automl logger"
          )
  
      return analysis
  
imports: import ray
  from ray import tune
  import os
  from bigdl.orca.automl.search.base import SearchEngine, TrialOutput, GoodError
  from bigdl.orca.automl.search.parameters import DEFAULT_LOGGER_NAME, DEFAULT_METRIC_NAME
  from bigdl.orca.automl.search.ray_tune.utils import convert_bayes_configs
  from bigdl.orca.automl.search.utils import get_ckpt_hdfs, put_ckpt_hdfs
  from ray.tune import Stopper
  from bigdl.orca.automl.model.abstract import ModelBuilder
  from bigdl.orca.data import ray_xshards
  from ray.tune.progress_reporter import TrialProgressCallback
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 6 for calling the RayTuneSearchEngine obj's underlying member method code with example usage: obj.run() and returns: analysis