class_docstr: Run the optimization process given the current executor
class_docstr_tok: ["Run","the","optimization","process","given","the","current","executor"]
code: def __init__(
      self,
      client: ExperimentClient,
      fct: Callable,
      pool_size: int,
      idle_timeout: int,
      max_trials_per_worker: int,
      max_broken: int,
      trial_arg: str,
      on_error: Callable[[ExperimentClient, Exception, int], bool]
      | None = None,
      prepare_trial: Callable[
          [ExperimentClient, Trial], None
      ] = prepare_trial_working_dir,
      interrupt_signal_code: int | None = None,
      gather_timeout: float = 0.01,
      n_workers: int | None = None,
      **kwargs,
  ):
      self.client = client
      self.fct = fct
      self.batch_size = pool_size
      self.max_trials_per_worker = max_trials_per_worker
      self.max_broken = max_broken
      self.trial_arg = trial_arg
      self.on_error = on_error
      self.prepare_trial = prepare_trial
      self.kwargs = kwargs
  
      self.gather_timeout = gather_timeout
      self.idle_timeout = idle_timeout
  
      self.worker_broken_trials = 0
      self.trials = 0
      self.futures = []
      self.pending_trials = {}
      self.stat = _Stat()
      self.n_worker_override = n_workers
  
      if interrupt_signal_code is None:
          interrupt_signal_code = (
              orion.core.config.worker.interrupt_signal_code
          )
  
      self.interrupt_signal_code = interrupt_signal_code
  
imports: from __future__ import annotations
  import logging
  import os
  import shutil
  import signal
  import time
  import typing
  import warnings
  from contextlib import contextmanager
  from dataclasses import dataclass
  from typing import Callable
  import orion.core
  from orion.core.utils import backward
  from orion.core.utils.exceptions import BrokenExperiment, CompletedExperiment, InvalidResult, LazyWorkers, ReservationRaceCondition, WaitingForTrials
  from orion.core.utils.flatten import flatten, unflatten
  from orion.core.worker.consumer import ExecutionError
  from orion.core.worker.trial import AlreadyReleased
  from orion.executor.base import AsyncException, AsyncResult
  from orion.storage.base import LockAcquisitionTimeout
label_desc: Use image node_id 1 to create a new Runner object  with example: obj = Runner(client, fct, pool_size, idle_timeout, max_trials_per_worker, max_broken, trial_arg, on_error, prepare_trial, interrupt_signal_code, gather_timeout, n_workers)