docstr: Run the controller loop.
  
  :param context: execution context
  :return: the ID of the round that was executed (either created or continued from previous optimization).
docstr_tok: ["Run","the","controller","loop",".",":","param","context",":","execution","context",":","return",":","the","ID","of","the","round","that","was","executed","(","either","created","or","continued","from","previous","optimization",")","."]
code: def run(self, pipeline: BaseStep, dact: DACT, round_scope: Round):
      """
      Run the controller loop.
  
      :param context: execution context
      :return: the ID of the round that was executed (either created or continued from previous optimization).
      """
  
      # thread_safe_lock, ..., context = context.thread_safe() ??
  
      hp_optimizer: BaseHyperparameterOptimizer = self[
          BaseHyperparameterOptimizer
      ]
      hp_space: HyperparameterSpace = pipeline.get_hyperparams_space()
  
      round_scope: Round = round_scope.with_optimizer(
          hp_optimizer, hp_space
      )
  
      for managed_trial_scope in self.loop(round_scope):
          managed_trial_scope: Trial = (
              managed_trial_scope  # typing helps
          )
          # trial_scope.context.restore_lock(thread_safe_lock) ??
          self.trainer.train(pipeline, dact, managed_trial_scope)
  
imports: import gc
  from copy import copy
  from typing import ContextManager, Iterator, List, Optional, Tuple
  from neuraxle.base import CX, BaseService, BaseStep, BaseStepT, ExecutionContext, ExecutionMode, ForceHandleMixin, TruncableService, _HasChildrenMixin
  from neuraxle.data_container import ARG_X_INPUTTED, IDT
  from neuraxle.data_container import DataContainer
  from neuraxle.data_container import TrainDACT
  from neuraxle.hyperparams.space import HyperparameterSpace
  from neuraxle.metaopt.callbacks import ARG_Y_EXPECTED, ARG_Y_PREDICTD, BaseCallback, CallbackList, MetricCallback, ScoringCallback
  from neuraxle.metaopt.context import AutoMLContext
  from neuraxle.metaopt.data.aggregates import Client, Project, Root, Round, Trial, TrialSplit
  from neuraxle.metaopt.data.reporting import RoundReport
  from neuraxle.metaopt.data.vanilla import DEFAULT_CLIENT, DEFAULT_PROJECT, RoundDataclass, ScopedLocation
  from neuraxle.metaopt.optimizer import BaseHyperparameterOptimizer, GridExplorationSampler, RandomSearchSampler
  from neuraxle.metaopt.repositories.repo import HyperparamsRepository
  from neuraxle.metaopt.validation import BaseValidationSplitter, ValidationSplitter
label_desc: Use image node_id 3 for calling the BaseControllerLoop obj's underlying member method code with example usage: obj.run(pipeline, dact, round_scope) without return types