class_docstr: Callback to track Optuna trials with Aim.
  
  This callback enables tracking of Optuna study in Aim.
  The study is tracked as a single experiment run,
  where all suggested hyperparameters and optimized metrics
  are logged and plotted as a function of optimizer steps.
  
  .. note::
      Users who want to run multiple Optuna studies within the same process
      should call ``close()`` method between subsequent calls to
      ``study.optimize()``. Calling ``close()`` method is not necessary
      if you are running one Optuna study per process.
  
  .. note::
      To ensure correct trial order in Aim, this callback
      should only be used with ``study.optimize(n_jobs=1)``.
  
  
  Args:
      metric_name:
          Name assigned to optimized metric. In case of multi-objective optimization,
          list of names can be passed. Those names will be assigned
          to metrics in the order returned by objective function.
          If single name is provided, or this argument is left to default value,
          it will be broadcasted to each objective with a number suffix in order
          returned by objective function e.g. two objectives and default metric name
          will be logged as ``value_0`` and ``value_1``. The number of metrics must be
          the same as the number of values objective function returns.
      as_multirun:
          Creates new runs for each trial and sets the metrics as run parametrs.
          Useful for exploring parameters in Aim UI
          (for more: https://aimstack.readthedocs.io/en/latest/ui/pages/explorers.html#params-explorer).
          If is false then all of the stats are tracked in a single run as Aim metrics.
class_docstr_tok: ["Callback","to","track","Optuna","trials","with","Aim",".","This","callback","enables","tracking","of","Optuna","study","in","Aim",".","The","study","is","tracked","as","a","single","experiment","run",",","where","all","suggested","hyperparameters","and","optimized","metrics","are","logged","and","plotted","as","a","function","of","optimizer","steps",".","..","note",":",":","Users","who","want","to","run","multiple","Optuna","studies","within","the","same","process","should","call","``","close","(",")","``","method","between","subsequent","calls","to","``","study.optimize","(",")","``",".","Calling","``","close","(",")","``","method","is","not","necessary","if","you","are","running","one","Optuna","study","per","process",".","..","note",":",":","To","ensure","correct","trial","order","in","Aim",",","this","callback","should","only","be","used","with","``","study.optimize","(","n_jobs=1",")","``",".","Args",":","metric_name",":","Name","assigned","to","optimized","metric",".","In","case","of","multi-objective","optimization",",","list","of","names","can","be","passed",".","Those","names","will","be","assigned","to","metrics","in","the","order","returned","by","objective","function",".","If","single","name","is","provided",",","or","this","argument","is","left","to","default","value",",","it","will","be","broadcasted","to","each","objective","with","a","number","suffix","in","order","returned","by","objective","function","e.g",".","two","objectives","and","default","metric","name","will","be","logged","as","``","value_0","``","and","``","value_1","``",".","The","number","of","metrics","must","be","the","same","as","the","number","of","values","objective","function","returns",".","as_multirun",":","Creates","new","runs","for","each","trial","and","sets","the","metrics","as","run","parametrs",".","Useful","for","exploring","parameters","in","Aim","UI","(","for","more",":","https",":","\/\/aimstack.readthedocs.io\/en\/latest\/ui\/pages\/explorers.html","#","params-explorer",")",".","If","is","false","then","all","of","the","stats","are","tracked","in","a","single","run","as","Aim","metrics","."]
code: def experiment(self) -> Run:
      if self._run is not None:
          return self._run
  
file_path: aim/aim/sdk/adapters/optuna.py
imports: import functools
  from typing import Callable, Optional, Sequence, Union
  import optuna
  from optuna._experimental import experimental_class, experimental_func
  from optuna._imports import try_import
  from optuna.study.study import ObjectiveFuncType
label_desc: Use image node_id 3 for calling the AimCallback obj's underlying member method code with example usage: obj.experiment() and returns: self