alab_management.experiment_view.experiment_view module#
A wrapper over the experiment class.
- class ExperimentStatus(value)[source]#
Bases:
EnumThe status of experiment.
PENDING: The experiment has not been processed by experiment managerRUNNING: The experiment has been submitted and put in the queueCOMPLETED: The experiment has been completedERROR: The experiment has failed somewhereCANCELLED: The experiment was cancelled and no tasks are still live
- CANCELLED = 5#
- COMPLETED = 3#
- ERROR = 4#
- PENDING = 1#
- RUNNING = 2#
- class ExperimentView[source]#
Bases:
objectExperiment view manages the experiment status, which is a collection of tasks and samples.
- create_experiment(experiment)[source]#
Create an experiment in the database which is intended for raw experiment inserted by users. The lab manager will add sample id and task id for the samples and tasks.
- Parameters:
experiment (
InputExperiment) – the required format of experiment, see alsoInputExperiment- Return type:
ObjectId
- get_experiment_by_sample_id(sample_id)[source]#
Get an experiment that contains a sample with the given sample_id.
- Return type:
dict[str,Any] |None
- get_experiment_by_task_id(task_id)[source]#
Get an experiment that contains a task with the given task_id.
- Return type:
dict[str,Any] |None
- dashboard_experiment_status(task_statuses, stored_status)[source]#
Status the Experiments page should show, from the tasks that are actually live.
A cancelled experiment used to look like
ERRORbecause one failed task overrode the whole row. If nothing is still running and any task was cancelled, the row isCANCELLED— finished, not live.- Return type:
str