Experiments¶
- class ExperimentClient(beaker: Beaker)[source]¶
Methods for interacting with Beaker Experiments. Accessed via the
Beaker.experimentproperty.Note
If you’re coming from the v1 client you may think we’re missing some important methods here. Those were moved to
Beaker.workloadmethods since workloads encompass experiments.Warning
Do not instantiate this class directly! The
Beakerclient will create one automatically which you can access through the corresponding property.- create(*, spec: BeakerExperimentSpec | PathLike | str, name: str | None = None, workspace: Workspace | None = None) Workload[source]¶
Create/launch a new experiment workload.
See also
Use
Beaker.workloadmethods for working with workload objects.- Returns:
A
BeakerWorkloadobject.- Raises:
BeakerExperimentConflict – If an experiment with the given name already exists.
- get_spec(experiment: Experiment | Workload) BeakerExperimentSpec[source]¶
Get the spec that defined an experiment.
- Parameters:
experiment – The
BeakerExperimentorBeakerWorkload.- Returns:
The corresponding
BeakerExperimentSpec.
- restart_tasks(experiment: Experiment | Workload) Workload[source]¶
Restart all failed or canceled tasks of an experiment.
See also
- Parameters:
experiment – The
BeakerExperimentorBeakerWorkload.- Returns:
The updated
BeakerWorkload.