15. Training Pipeline - m-marini/wheellyj GitHub Wiki
This batch script automates the complete training workflow for the Wheelly project, from dataset generation to report creation.
Overview
The pipeline consists of the following stages:
- Load the execution configuration.
- Generate the training dataset from inference results (if it does not already exist).
- Execute the batch training process.
- Generate the report data.
- Produce the final report using GNU Octave.
The workflow is designed to be incremental: if the training dataset already exists, the dataset generation step is skipped and the pipeline resumes from the training phase.
Prerequisites
Before running the script, ensure that:
- The project has been built.
- Java is installed and available.
- GNU Octave is installed.
- The configuration script
bin/setConfig.cmdis correctly configured. - All required environment variables are defined.
Configuration Variables
The pipeline uses the following configuration variables, initialized by
bin/setConfig.cmd.
| Variable | Description |
|---|---|
INFERENCE |
Input inference data. |
TEMP |
Temporary directory containing the generated training dataset. |
KPIS |
Output directory containing training metrics and KPIs. |
CSVS |
Output directory containing CSV files used for reporting. |
Pipeline Stages
1. Load Configuration
The script starts by loading all required configuration variables.
call bin\setConfig.cmd
2. Generate the Training Dataset
If the temporary dataset directory does not exist, the script converts the inference output into a training dataset.
org.mmarini.wheelly.apps.CreateDatasets
The generated dataset is stored in the directory referenced by TEMP.
If the directory already exists, this step is skipped.
3. Run Batch Training
Before training starts, any previous KPI directory is removed to ensure a clean execution.
org.mmarini.wheelly.apps.BatchTraining
The training process reads the dataset from TEMP and writes its output to KPIS.
4. Generate Report Data
After training completes, the reporting utility extracts the metrics and produces CSV files that will be used by the reporting tools.
report.cmd
The generated files are written to the directory referenced by CSVS.
5. Generate the Final Report
Finally, the script invokes GNU Octave to execute the reporting script:
octave/dlReport.m
The Octave script reads the generated CSV files and creates the final training report.
Incremental Execution
The pipeline supports incremental execution.
- If the dataset already exists (
TEMP), dataset generation is skipped. - Training and report generation are always executed.
- Previous KPI results are deleted before each training run.
Generated Artifacts
At the end of a successful execution, the following artifacts are available:
- Generated training dataset (
TEMP) - Training KPIs (
KPIS) - Report CSV files (
CSVS) - Final report generated by the Octave script
Execution Flow
The following diagram illustrates the sequence of operations performed by the training pipeline.
flowchart TD
START([Start])
CFG[Load Configuration]
CHECK{Training dataset exists?}
CREATE[CreateDatasets]
CLEAN[Remove previous KPIs]
TRAIN[BatchTraining]
REPORT[Generate Report Data]
OCTAVE[Run dlReport.m]
END([End])
START --> CFG
CFG --> CHECK
CHECK -- No --> CREATE
CHECK -- Yes --> CLEAN
CREATE --> CLEAN
CLEAN --> TRAIN
TRAIN --> REPORT
REPORT --> OCTAVE
OCTAVE --> END
Data Flow
The following diagram illustrates how data and generated artifacts move through the pipeline.
flowchart LR
INF[(Inference Data)]
TMP[(Training Dataset)]
KPI[(KPIs)]
CSV[(CSV Reports)]
REP[(Final Report)]
CDS["CreateDatasets"]
TRN["BatchTraining"]
RPT["report.cmd"]
OCT["dlReport.m"]
INF --> CDS
CDS --> TMP
TMP --> TRN
TRN --> KPI
TMP --> RPT
KPI --> RPT
RPT --> CSV
CSV --> OCT
OCT --> REP
Release
Current release: 0.26.0