olympus.tasks.task module

class olympus.tasks.task.GenerateSummary[source]

Bases: object

Methods

get_name  
is_nested  
print  
rename  
retrieve_nested  
task_summary  
dispatch = {'DataLoader': <function GenerateSummary.<lambda> at 0x7f68e0704b70>, 'LRSchedule': <function GenerateSummary.<lambda> at 0x7f68e0704d08>, 'MetricList': <function GenerateSummary.<lambda> at 0x7f68e0704c80>, 'Model': <function GenerateSummary.<lambda> at 0x7f68e0704a60>, 'Optimizer': <function GenerateSummary.<lambda> at 0x7f68e0704ae8>, 'TransformedSubset': <function GenerateSummary.<lambda> at 0x7f68e0704bf8>}
get_name(self, attr, obj, type_name, depth=0)[source]
is_nested(self, name)[source]
print(self, msg='', end='n')[source]
rename(self, name)[source]
retrieve_nested(self, name, obj)[source]
task_summary(self, obj)[source]
class olympus.tasks.task.Task(device=None)[source]

Bases: object

Attributes:
device
metrics

Methods

eval_loss(self, batch) This is used to compute validation and test loss
fit(self, epoch[, context]) Execute a single batch
get_space(self, \*\*fidelities) Return missing hyper parameters that need to be set using init
init(self, \*\*kwargs) Used to initialize the hyperparameters is any
load_state_dict(self, state[, strict]) Try to load a previous unfinished state to resume
state_dict(self[, destination, prefix, …]) Save a state the task can go back to if an error occur
report  
resumed  
set_device  
summary  
device
eval_loss(self, batch)[source]

This is used to compute validation and test loss

fit(self, epoch, context=None)[source]

Execute a single batch

Parameters:
epoch: int

current step in the training process

context: dict

Optional Context

Notes

You should wrap whatever code you have here inside a BadResumeGuard to prevent users from resuming a failed task that can have a bad states

To resume a task, you need to create a clean one with the same hyper parameters. It will pickup automatically where at its last checkpoint

get_space(self, **fidelities)[source]

Return missing hyper parameters that need to be set using init

init(self, **kwargs)[source]

Used to initialize the hyperparameters is any

load_state_dict(self, state, strict=True)[source]

Try to load a previous unfinished state to resume

Notes

You should wrap whatever code you have here inside a BadResumeGuard to prevent users from resuming a failed task that can have a bad states

To resume a task, you need to create a clean one with the same hyper parameters. It will pickup automatically where at its last checkpoint

metrics
report(self, pprint=True, print_fun=<built-in function print>)[source]
resumed(self)[source]
set_device(self, device)[source]
state_dict(self, destination=None, prefix='', keep_vars=False)[source]

Save a state the task can go back to if an error occur

summary(self)[source]