ax.runners

Synthetic Runner

class ax.runners.synthetic.SyntheticRunner(dummy_metadata: Optional[str] = None)[source]

Bases: ax.core.runner.Runner

Class for synthetic or dummy runner.

Currently acts as a shell runner, only creating a name.

run(trial: ax.core.base_trial.BaseTrial)Dict[str, Any][source]

Deploys a trial based on custom runner subclass implementation.

Parameters

trial – The trial to deploy.

Returns

Dict of run metadata from the deployment process.

Simulated Backend Runner

class ax.runners.simulated_backend.SimulatedBackendRunner(simulator: ax.utils.testing.backend_simulator.BackendSimulator, sample_runtime_func: Optional[Callable[[ax.core.base_trial.BaseTrial], float]] = None)[source]

Bases: ax.core.runner.Runner

Class for a runner that works with the BackendSimulator.

run(trial: ax.core.base_trial.BaseTrial)Dict[str, Any][source]

Start a trial on the BackendSimulator.

Parameters

trial – Trial to deploy via the runner.

Returns

Dict containing the sampled runtime of the trial.

stop(trial: ax.core.base_trial.BaseTrial)None[source]

Stop a trial on the BackendSimulator.

Parameters

trial – Trial to stop on the simulator.

ax.runners.simulated_backend.sample_runtime_unif(trial: ax.core.base_trial.BaseTrial, low: float = 1.0, high: float = 5.0)float[source]

Return a uniform runtime in [low, high]

Parameters
  • trial – Trial for which to sample runtime.

  • low – Lower bound of uniform runtime distribution.

  • high – Upper bound of uniform runtime distribution.

Returns

A float representing the simulated trial runtime.