Progress

class olympus.observers.progress.DefaultProgress(speed: olympus.observers.progress.Speed)[source]

Bases: object

Methods

load_state_dict  
show_progress  
state_dict  
load_state_dict(state_dict)[source]
show_progress()[source]
state_dict()[source]
class olympus.observers.progress.ElapsedRealTime(frequency_new_epoch: int = 0, frequency_new_batch: int = 0, frequency_new_trial: int = 0, priority: int = 0, start_time: datetime.datetime = <factory>, end_time: datetime.datetime = <factory>)[source]

Bases: olympus.observers.observer.Observer

Attributes:
elapsed_time

Methods

every(*args[, epoch, batch]) Define how often this metric should be called
load_state_dict(state_dict) Load a state dictionary to resume a previous training
on_end_train(task[, step]) Called at the end of training after the last epoch
on_new_batch(task, step[, input, context]) Called after a batch has been processed
on_new_epoch(task, epoch, context) Called at the end of an epoch, before a new epoch starts
on_new_trial(task, step, parameters, uid) Called after a trial has been processed
on_start_train(task[, step]) Called on ce the training starts
state_dict() Return a state dictionary used to checkpointing and resuming
value() Return the key values that metrics computes
on_end_batch  
elapsed_time
load_state_dict(state_dict)[source]

Load a state dictionary to resume a previous training

on_end_batch(step, task, input=None, context=None)[source]
on_end_train(task, step=None)[source]

Called at the end of training after the last epoch

state_dict()[source]

Return a state dictionary used to checkpointing and resuming

value()[source]

Return the key values that metrics computes

class olympus.observers.progress.EpochProgress(speed: olympus.observers.progress.Speed, epochs: int, steps: olympus.observers.progress.GuessMaxStep = <factory>)[source]

Bases: object

Methods

load_state_dict  
show_progress  
state_dict  
load_state_dict(state_dict)[source]
show_progress()[source]
state_dict()[source]
class olympus.observers.progress.GuessMaxStep(max_steps=None)[source]

Bases: object

Methods

load_state_dict  
max_step  
state_dict  
update  
load_state_dict(state_dict)[source]
max_step()[source]
state_dict()[source]
update(new_step)[source]
class olympus.observers.progress.ProgressView(speed: olympus.observers.progress.Speed, max_epochs=None, max_steps=None)[source]

Bases: olympus.observers.observer.Observer

Print progress regularly

Parameters:
speed: Speed

speed observer used to gather information about timings It is used to compute an estimated end time

max_epochs: Optional[int]

The total number of epochs

max_steps: Optional[int]

The total number of steps in a single epochs

Notes

If no max epochs nor max steps are specified it outputs 12 Elapsed time 0.12 min (1.00 s/step)

if both max epochs and max steps are specified, it outputs [ 25.00 %] Epoch [  1/  4][  12/  12] Remaining: 0:00:36.042655

if only max epochs is specified we will try to guess the max steps during the first epoch.

Methods

every(*args[, epoch, batch]) Define how often this metric should be called
load_state_dict(state_dict) Load a state dictionary to resume a previous training
on_end_train(task[, step]) Called at the end of training after the last epoch
on_new_batch(task, step[, input, context]) Called after a batch has been processed
on_new_epoch(task, epoch, context) Called at the end of an epoch, before a new epoch starts
on_new_trial(task, step, parameters, uid) Called after a trial has been processed
on_start_train(task[, step]) Called on ce the training starts
state_dict() Return a state dictionary used to checkpointing and resuming
value() Return the key values that metrics computes
on_end_batch  
on_end_epoch  
on_resume_train  
reset_throttle  
select_progress_printer  
set_max_epochs  
set_max_steps  
show_progress  
load_state_dict(state_dict)[source]

Load a state dictionary to resume a previous training

on_end_batch(task, step, input=None, context=None)[source]
on_end_epoch(task, epoch, context)[source]
on_end_train(task, step=None)[source]

Called at the end of training after the last epoch

on_new_epoch(task, epoch, context)[source]

Called at the end of an epoch, before a new epoch starts

on_resume_train(task, epoch)[source]
on_start_train(task, step=None)[source]

Called on ce the training starts

Notes

You should not rely on this function to initialize your metric as it will not be called if the training is resumed from a previous state

reset_throttle()[source]
select_progress_printer(max_epochs=None, max_steps=None)[source]
set_max_epochs(epochs)[source]
set_max_steps(steps)[source]
show_progress(start='\r', end='\n')[source]
state_dict()[source]

Return a state dictionary used to checkpointing and resuming

value()[source]

Return the key values that metrics computes

class olympus.observers.progress.SampleCount(frequency_new_epoch: int = 0, frequency_new_batch: int = 0, frequency_new_trial: int = 0, priority: int = 0, sample_count: int = 0, frequency_end_batch: int = 1)[source]

Bases: olympus.observers.observer.Observer

Methods

every(*args[, epoch, batch]) Define how often this metric should be called
load_state_dict(state_dict) Load a state dictionary to resume a previous training
on_end_train(task[, step]) Called at the end of training after the last epoch
on_new_batch(task, step[, input, context]) Called after a batch has been processed
on_new_epoch(task, epoch, context) Called at the end of an epoch, before a new epoch starts
on_new_trial(task, step, parameters, uid) Called after a trial has been processed
on_start_train(task[, step]) Called on ce the training starts
state_dict() Return a state dictionary used to checkpointing and resuming
value() Return the key values that metrics computes
on_end_batch  
frequency_end_batch = 1
load_state_dict(state_dict)[source]

Load a state dictionary to resume a previous training

on_end_batch(task, step, input=None, context=None)[source]
sample_count = 0
state_dict()[source]

Return a state dictionary used to checkpointing and resuming

value()[source]

Return the key values that metrics computes

class olympus.observers.progress.Speed(frequency_new_epoch: int = 1, frequency_new_batch: int = 1, frequency_new_trial: int = 0, priority: int = 10, batch_size: int = 0, frequency_end_epoch: int = 1, frequency_end_batch: int = 1, step_time: olympus.utils.stat.StatStream = <factory>, epoch_time: olympus.utils.stat.StatStream = <factory>, step_start: datetime.datetime = <factory>, epoch_start: datetime.datetime = <factory>, step: int = 0, epoch: int = 0, total_steps: int = 0)[source]

Bases: olympus.observers.observer.Observer

Methods

every(*args[, epoch, batch]) Define how often this metric should be called
load_state_dict(state_dict) Load a state dictionary to resume a previous training
on_end_train(task[, step]) Called at the end of training after the last epoch
on_new_batch(task, step[, input, context]) Called after a batch has been processed
on_new_epoch(task, epoch, context) Called at the end of an epoch, before a new epoch starts
on_new_trial(task, step, parameters, uid) Called after a trial has been processed
on_start_train(task[, step]) Called on ce the training starts
state_dict() Return a state dictionary used to checkpointing and resuming
value() Return the key values that metrics computes
guess_batch_size  
on_end_batch  
on_end_epoch  
batch_size = 0
epoch = 0
frequency_end_batch = 1
frequency_end_epoch = 1
frequency_new_batch = 1
frequency_new_epoch = 1
guess_batch_size(input)[source]
load_state_dict(state_dict)[source]

Load a state dictionary to resume a previous training

on_end_batch(task, step, input=None, context=None)[source]
on_end_epoch(task, epoch, context=None)[source]
on_new_batch(task, step, input=None, context=None)[source]

Called after a batch has been processed

on_new_epoch(task, epoch, context)[source]

Called at the end of an epoch, before a new epoch starts

priority = 10
state_dict()[source]

Return a state dictionary used to checkpointing and resuming

step = 0
total_steps = 0
value()[source]

Return the key values that metrics computes

class olympus.observers.progress.StepProgress(speed: olympus.observers.progress.Speed, steps: int)[source]

Bases: object

Methods

load_state_dict  
show_progress  
state_dict  
load_state_dict(state_dict)[source]
show_progress()[source]
state_dict()[source]
olympus.observers.progress.fill(msg, size=40)[source]
olympus.observers.progress.get_time_delta(start)[source]
olympus.observers.progress.show_progress(speed: olympus.observers.progress.Speed)[source]