docstr: Initialize an Optuna search strategy optimizer
  Optuna performs robust and efficient hyperparameter optimization at scale by combining.
  Specific hyperparameter pruning strategy can be selected via `sampler` and `pruner` arguments
  
  :param str base_task_id: Task ID (str)
  :param list hyper_parameters: list of Parameter objects to optimize over
  :param Objective objective_metric: Objective metric to maximize / minimize
  :param str execution_queue: execution queue to use for launching Tasks (experiments).
  :param int num_concurrent_workers: Limit number of concurrent running Tasks (machines)
  :param int max_iteration_per_job: number of iteration per job
      'iterations' are the reported iterations for the specified objective,
      not the maximum reported iteration of the Task.
  :param int total_max_jobs: total maximum job for the optimization process.
      Must be provided in order to calculate the total budget for the optimization process.
      The total budget is measured by "iterations" (see above)
      and will be set to `max_iteration_per_job * total_max_jobs`
      This means more than total_max_jobs could be created, as long as the cumulative iterations
      (summed over all created jobs) will not exceed `max_iteration_per_job * total_max_jobs`
  :param float pool_period_min: time in minutes between two consecutive pools
  :param int min_iteration_per_job: The minimum number of iterations (of the Objective metric) per single job,
      before early stopping the Job. (Optional)
  :param float time_limit_per_job: Optional, maximum execution time per single job in minutes,
      when time limit is exceeded job is aborted
  :param float compute_time_limit: The maximum compute time in minutes. When time limit is exceeded,
      all jobs aborted. (Optional)
  :param optuna_kwargs: arguments passed directly to the Optuna object
docstr_tok: ["Initialize","an","Optuna","search","strategy","optimizer","Optuna","performs","robust","and","efficient","hyperparameter","optimization","at","scale","by","combining",".","Specific","hyperparameter","pruning","strategy","can","be","selected","via","`","sampler","`","and","`","pruner","`","arguments",":","param","str","base_task_id",":","Task","ID","(","str",")",":","param","list","hyper_parameters",":","list","of","Parameter","objects","to","optimize","over",":","param","Objective","objective_metric",":","Objective","metric","to","maximize","\/","minimize",":","param","str","execution_queue",":","execution","queue","to","use","for","launching","Tasks","(","experiments",")",".",":","param","int","num_concurrent_workers",":","Limit","number","of","concurrent","running","Tasks","(","machines",")",":","param","int","max_iteration_per_job",":","number","of","iteration","per","job","'iterations","'","are","the","reported","iterations","for","the","specified","objective",",","not","the","maximum","reported","iteration","of","the","Task",".",":","param","int","total_max_jobs",":","total","maximum","job","for","the","optimization","process",".","Must","be","provided","in","order","to","calculate","the","total","budget","for","the","optimization","process",".","The","total","budget","is","measured","by","``","iterations","''","(","see","above",")","and","will","be","set","to","`","max_iteration_per_job","*","total_max_jobs","`","This","means","more","than","total_max_jobs","could","be","created",",","as","long","as","the","cumulative","iterations","(","summed","over","all","created","jobs",")","will","not","exceed","`","max_iteration_per_job","*","total_max_jobs","`",":","param","float","pool_period_min",":","time","in","minutes","between","two","consecutive","pools",":","param","int","min_iteration_per_job",":","The","minimum","number","of","iterations","(","of","the","Objective","metric",")","per","single","job",",","before","early","stopping","the","Job",".","(","Optional",")",":","param","float","time_limit_per_job",":","Optional",",","maximum","execution","time","per","single","job","in","minutes",",","when","time","limit","is","exceeded","job","is","aborted",":","param","float","compute_time_limit",":","The","maximum","compute","time","in","minutes",".","When","time","limit","is","exceeded",",","all","jobs","aborted",".","(","Optional",")",":","param","optuna_kwargs",":","arguments","passed","directly","to","the","Optuna","object"]
code: def __init__(
      self,
      base_task_id,  # type: str
      hyper_parameters,  # type: Sequence[Parameter]
      objective_metric,  # type: Objective
      execution_queue,  # type: str
      num_concurrent_workers,  # type: int
      max_iteration_per_job,  # type: Optional[int]
      total_max_jobs,  # type: Optional[int]
      pool_period_min=2.0,  # type: float
      min_iteration_per_job=None,  # type: Optional[int]
      time_limit_per_job=None,  # type: Optional[float]
      compute_time_limit=None,  # type: Optional[float]
      optuna_sampler=None,  # type: Optional[optuna.samplers.base]
      optuna_pruner=None,  # type: Optional[optuna.pruners.base]
      continue_previous_study=None,  # type: Optional[optuna.Study]
      **optuna_kwargs,  # type: Any
  ):
      # type: (...) -> None
      """
      Initialize an Optuna search strategy optimizer
      Optuna performs robust and efficient hyperparameter optimization at scale by combining.
      Specific hyperparameter pruning strategy can be selected via `sampler` and `pruner` arguments
  
      :param str base_task_id: Task ID (str)
      :param list hyper_parameters: list of Parameter objects to optimize over
      :param Objective objective_metric: Objective metric to maximize / minimize
      :param str execution_queue: execution queue to use for launching Tasks (experiments).
      :param int num_concurrent_workers: Limit number of concurrent running Tasks (machines)
      :param int max_iteration_per_job: number of iteration per job
          'iterations' are the reported iterations for the specified objective,
          not the maximum reported iteration of the Task.
      :param int total_max_jobs: total maximum job for the optimization process.
          Must be provided in order to calculate the total budget for the optimization process.
          The total budget is measured by "iterations" (see above)
          and will be set to `max_iteration_per_job * total_max_jobs`
          This means more than total_max_jobs could be created, as long as the cumulative iterations
          (summed over all created jobs) will not exceed `max_iteration_per_job * total_max_jobs`
      :param float pool_period_min: time in minutes between two consecutive pools
      :param int min_iteration_per_job: The minimum number of iterations (of the Objective metric) per single job,
          before early stopping the Job. (Optional)
      :param float time_limit_per_job: Optional, maximum execution time per single job in minutes,
          when time limit is exceeded job is aborted
      :param float compute_time_limit: The maximum compute time in minutes. When time limit is exceeded,
          all jobs aborted. (Optional)
      :param optuna_kwargs: arguments passed directly to the Optuna object
      """
      super(OptimizerOptuna, self).__init__(
          base_task_id=base_task_id,
          hyper_parameters=hyper_parameters,
          objective_metric=objective_metric,
          execution_queue=execution_queue,
          num_concurrent_workers=num_concurrent_workers,
          pool_period_min=pool_period_min,
          time_limit_per_job=time_limit_per_job,
          compute_time_limit=compute_time_limit,
          max_iteration_per_job=max_iteration_per_job,
          min_iteration_per_job=min_iteration_per_job,
          total_max_jobs=total_max_jobs,
      )
      self._optuna_sampler = optuna_sampler
      self._optuna_pruner = optuna_pruner
      verified_optuna_kwargs = []
      self._optuna_kwargs = dict(
          (k, v)
          for k, v in optuna_kwargs.items()
          if k in verified_optuna_kwargs
      )
      self._param_iterator = None
      self._objective = None
      self._study = (
          continue_previous_study if continue_previous_study else None
      )
  
file_path: clearml/clearml/automation/optuna/optuna.py
imports: from time import sleep
  from typing import Any, Optional, Sequence
  from ..optimization import Objective, SearchStrategy
  from ..parameters import DiscreteParameterRange, Parameter, UniformIntegerParameterRange, UniformParameterRange, LogUniformParameterRange
  from ...task import Task
label_desc: Use image node_id 1 to create a new OptimizerOptuna object from inherited base classes: SearchStrategy with example: obj = OptimizerOptuna(base_task_id, hyper_parameters, objective_metric, execution_queue, num_concurrent_workers, max_iteration_per_job, total_max_jobs, pool_period_min, min_iteration_per_job, time_limit_per_job, compute_time_limit, optuna_sampler, optuna_pruner, continue_previous_study)