syne_tune.backend.simulator_backend.events module
- class syne_tune.backend.simulator_backend.events.Event(trial_id)[source]
Bases:
objectBase class for events dealt with in the simulator.
-
trial_id:
int
-
trial_id:
- class syne_tune.backend.simulator_backend.events.StartEvent(trial_id)[source]
Bases:
EventStart training evaluation function for
trial_id. In fact, the function is run completely, andOnTrialResultEventevents and oneCompleteEventare generated.
- class syne_tune.backend.simulator_backend.events.CompleteEvent(trial_id, status)[source]
Bases:
EventJob for trial
trial_idcompletes with statusstatus. This is registered at the backend.-
status:
str
-
status:
- class syne_tune.backend.simulator_backend.events.StopEvent(trial_id)[source]
Bases:
EventJob for trial
trial_idis stopped. This leads to all later events fortrial_idto be deleted, and a newCompleteEvent.
- class syne_tune.backend.simulator_backend.events.OnTrialResultEvent(trial_id, result)[source]
Bases:
EventResult reported by some worker arrives at the backend and is registered there.
-
result:
Dict[str,Any]
-
result:
- class syne_tune.backend.simulator_backend.events.SimulatorState(event_heap=None, events_added=0)[source]
Bases:
objectMaintains the state of the simulator, in particular the event heap.
event_heapis the priority queue for events, the key being(time, cnt), wheretimeis the event time, andcntis a non-negative int used to break ties. When an event is added, thecntvalue is taken fromevents_added. This means that ties are broken first_in_first_out.- push(event, event_time)[source]
Push new event onto heap
- Parameters:
event (
Event)event_time (
float)