docstr: Stop the current running optimization loop,
  Called from a different thread than the :meth:`start`.
docstr_tok: ["Stop","the","current","running","optimization","loop",",","Called","from","a","different","thread","than","the",":","meth",":","`","start","`","."]
code: def stop(self):
      # type: () -> ()
      """
      Stop the current running optimization loop,
      Called from a different thread than the :meth:`start`.
      """
      if self._study:
          try:
              self._study.stop()
          except Exception as ex:
              print(ex)
      self._stop_event.set()
  
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 3 for calling the OptimizerOptuna obj's underlying member method code with example usage: obj.stop() without return types