Experiment Queue Manager

Tabular experiment task queue: task dictionary, priority sorting, pause/termination and reserved execution.

Overview

quatm/GUI/experiment/experiment_queue.py provides the experiment queue manager (ExperimentQueue ): it shows the task queue as a table (the task dictionary expDict, keyed by task number) and supports priority sorting, state tracking and controls such as pause/terminate/delete. submit() is the only enqueueing entry point on the GUI thread (task numbers are allocated centrally, and the Looper also goes through it via the submitItem signal).

Key methods

MethodDescription
submitThe single enqueueing entry point: allocates task numbers centrally
pausePauses/resumes the currently running experiment
set_sleepingSets a task to Sleeping / Queued (reserved execution)
terminate_clicked / terminate_allGracefully terminates the selected / all tasks (Termination Pending)
delete_item / delete_clickedDeletes a task (graceful termination if it is running)
update_itemRefreshes the row of a task
set_modelReplaces the table model (ScheduleModel)

Task-state enumeration: Queued / Waiting / Sleeping / Running / Paused / Scanning / Terminating / Termination Pending / Done / Failed.

Usage

from quatm.GUI.experiment.experiment_queue import ExperimentQueue

q = ExperimentQueue(browser=parent)   # embedded in the experiment browser
q.submit(task_dict)   # enqueue (called on the GUI thread)

For a fuller description see Experiment queue.