Hectiq Lab

Steps

Steps is an abstract concept to organize your tasks. In many situations, a run will be a regular task (a training for example) and you will want to organize it in a more granular way. This is where steps come in. A step is a sub-task of a run. It can be a training epochs, a validation, a test, a data preprocessing, etc.

We have designed the interface so that we roughly have ten steps per run. If you need more, you should reduce the number of steps or organize them in a more granular way.

Steps must always be a part of a run. If you attempt to create a step without a run, the step will not be created.

Start a step

You can create a step using the start_step method. You can also create a step using the Step context manager.

We highly recommend using the Step context manager to create a step. It will automatically end the step when the context is exited. It also handles the errors and exceptions in a more elegant way.

from pyhectiqlab import Step
with Step() as step:
    pass
ParameterTypeDescription
namestrThe name of the step.
descriptionstrThe description of the step.
metadatadictThe metadata of the step.
statusstrThe status of the step.
run_idstrThe ID of the run to which the step belongs. If not provided, the step will be created in the current run.

End a step

If you have used the functional or object-oriented approach to create a step, you can end it using the end method. If you have used the contextual approach, the step will be ended automatically when the context is exited.

from pyhectiqlab import Step
with Step() as step:
    pass
# The step will be ended automatically

Update a step

You can update a step using the update method.

import pyhectiqlab.functional as hl
hl.update_step(name="My new name")

On this page