scine_chemoton.gears.scheduler

Classes

Scheduler()

This Gear is a basic scheduler for all calculations stored in the database.

class scine_chemoton.gears.scheduler.Scheduler[source]

This Gear is a basic scheduler for all calculations stored in the database. By default, all Calculations generated by other Gears will be set to ‘hold’ upon creation. The scheduler will then, based on the given options, add them to the queue of Calculations run by the backend (Puffins).

Notes

The logic counts the number of active Calculations per Order and compares with the allowed number of active Calculations. The gap between these numbers will be closed by activating Calculations that are currently on hold. The order of the execution of the jobs as well as their activation does not necessarily follow the chronological order of their generation.

Attributes:
optionsScheduler.Options

The options for the Scheduler Gear.

class Options[source]

The options for the Scheduler Gear.

cycle_time: int
int

The minimum number of seconds between two cycles of the Gear. Cycles are finished independently of this option, hence if a cycle takes longer than the cycle_time will effectively lead to longer cycle times and not cause multiple cycles of the same Gear.

job_counts: Dict[str, int]
Dict[str, int]

The number of Calculations to be set to run at any given time. Counts are given per order type (i.e. ‘scine_hessian’).

job_priorities: Dict[str, int]
Dict[str, int]

The priority number of Calculations, which determines which are executed first. Priorities are given per order type (i.e. ‘scine_hessian’). A lower number corresponds to earlier execution. The possible range of numbers is 1 to 10.

model: Model
db.Model

The model the Gear is working with.

unset_collections()

Duplicate name to HoldCollections method to be triggered in pickling process, so infinite _parent loops are avoided.

Return type:

None

initialize_collections(manager)
Return type:

None

property name: str
options: Options
static possible_attributes()
Return type:

List[str]

stop()
Return type:

None

property stop_at_next_break_point: bool
unset_collections()
Return type:

None