Skip to content
Snippets Groups Projects
Select Git revision
  • enxhi_issue460_remove_TOAR-I_access
  • michael_issue459_preprocess_german_stations
  • sh_pollutants
  • develop protected
  • master default protected
  • release_v2.4.0
  • michael_issue450_feat_load-ifs-data
  • lukas_issue457_feat_set-config-paths-as-parameter
  • lukas_issue454_feat_use-toar-statistics-api-v2
  • lukas_issue453_refac_advanced-retry-strategy
  • lukas_issue452_bug_update-proj-version
  • lukas_issue449_refac_load-era5-data-from-toar-db
  • lukas_issue451_feat_robust-apriori-estimate-for-short-timeseries
  • lukas_issue448_feat_load-model-from-path
  • lukas_issue447_feat_store-and-load-local-clim-apriori-data
  • lukas_issue445_feat_data-insight-plot-monthly-distribution
  • lukas_issue442_feat_bias-free-evaluation
  • lukas_issue444_feat_choose-interp-method-cams
  • 414-include-crps-analysis-and-other-ens-verif-methods-or-plots
  • lukas_issue384_feat_aqw-data-handler
  • v2.4.0 protected
  • v2.3.0 protected
  • v2.2.0 protected
  • v2.1.0 protected
  • Kleinert_etal_2022_initial_submission
  • v2.0.0 protected
  • v1.5.0 protected
  • v1.4.0 protected
  • v1.3.0 protected
  • v1.2.1 protected
  • v1.2.0 protected
  • v1.1.0 protected
  • IntelliO3-ts-v1.0_R1-submit
  • v1.0.0 protected
  • v0.12.2 protected
  • v0.12.1 protected
  • v0.12.0 protected
  • v0.11.0 protected
  • v0.10.0 protected
  • IntelliO3-ts-v1.0_initial-submit
40 results

customise.rst

Blame
  • customise.rst 13.49 KiB

    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.

    ./_plots/run_modules_schedule.png

    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.