class_docstr: Class for a runner that works with the BackendSimulator.
class_docstr_tok: ["Class","for","a","runner","that","works","with","the","BackendSimulator","."]
docstr: Runner for a BackendSimulator.
  
  Args:
      simulator: The backend simulator.
      sample_runtime_func: A Callable that samples a runtime given a trial.
docstr_tok: ["Runner","for","a","BackendSimulator",".","Args",":","simulator",":","The","backend","simulator",".","sample_runtime_func",":","A","Callable","that","samples","a","runtime","given","a","trial","."]
code: def __init__(
      self,
      simulator: BackendSimulator,
      sample_runtime_func: Optional[
          Callable[[BaseTrial], float]
      ] = None,
  ) -> None:
      """Runner for a BackendSimulator.
  
      Args:
          simulator: The backend simulator.
          sample_runtime_func: A Callable that samples a runtime given a trial.
      """
      self.simulator = simulator
      if sample_runtime_func is None:
          sample_runtime_func = sample_runtime_unif
      self.sample_runtime_func: Callable[
          [BaseTrial], float
      ] = sample_runtime_func
  
file_path: Ax/ax/runners/simulated_backend.py
imports: from collections import defaultdict
  from typing import Any, Callable, Dict, Iterable, Optional, Set
  import numpy
  from ax.core.base_trial import BaseTrial, TrialStatus
  from ax.core.runner import Runner
  from ax.utils.testing.backend_simulator import BackendSimulator
label_desc: Use image node_id 1 to create a new SimulatedBackendRunner object from inherited base classes: Runner with example: obj = SimulatedBackendRunner(simulator, sample_runtime_func)