Object Detection

class olympus.tasks.detection.ObjectDetection(detector, optimizer, lr_scheduler, dataloader, criterion=None, device=None, storage=None, logger=None)[source]

Bases: olympus.tasks.task.Task

Attributes:
device
metrics
model

Methods

eval_loss(self, batch) This is used to compute validation and test loss
fit(self, epochs[, context]) Execute a single batch
get_space(self) Return hyper parameter space
init(self[, optimizer, lr_schedule, model, uid]) 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
epoch  
parameters  
report  
resumed  
set_device  
step  
summary  
epoch(self, epoch, context)[source]
eval_loss(self, batch)[source]

This is used to compute validation and test loss

fit(self, epochs, 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)[source]

Return hyper parameter space

init(self, optimizer=None, lr_schedule=None, model=None, uid=None)[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

model
parameters(self)[source]
state_dict(self, destination=None, prefix='', keep_vars=False)[source]

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

step(self, step, input, context)[source]