customise.rst
-
lukas leufen authoredlukas leufen authored
Default Workflow
MLAir is constituted of so-called run_modules
which are executed in a distinct order called workflow
. MLAir
provides a DefaultWorkflow
. This workflow runs the run modules ExperimentSetup
, PreProcessing
,
ModelSetup
, Training
, and PostProcessing
one by one.

Sketch of the default workflow.
import mlair
# create your custom MLAir workflow
DefaultWorkflow = mlair.DefaultWorkflow()
# execute default workflow
DefaultWorkflow.run()
The output of running this default workflow will be structured like the following.
INFO: mlair started
INFO: ExperimentSetup started
...
INFO: ExperimentSetup finished after 00:00:01 (hh:mm:ss)
INFO: PreProcessing started
...
INFO: PreProcessing finished after 00:00:11 (hh:mm:ss)
INFO: ModelSetup started
...
INFO: ModelSetup finished after 00:00:01 (hh:mm:ss)
INFO: Training started
...
INFO: Training finished after 00:02:15 (hh:mm:ss)
INFO: PostProcessing started
...
INFO: PostProcessing finished after 00:01:37 (hh:mm:ss)
INFO: mlair finished after 00:04:05 (hh:mm:ss)
Customised Run Module and Workflow
It is possible to create new custom run modules. A custom run module is required to inherit from the base class
RunEnvironment
and to hold the constructor method __init__()
. This method has to execute the module on call.
In the following example, this is done by using the _run()
method that is called by the initialiser. It is
possible to parse arguments to the custom run module as shown.