ML training script launcher. More...
#include <ml_trainer.h>
Public Member Functions | |
| MLTrainer () | |
| MLTrainer (const UTILSLIB::PythonRunnerConfig &config) | |
| UTILSLIB::PythonRunner & | runner () |
| UTILSLIB::PythonRunnerResult | run (const QString &scriptPath, const QStringList &args={}) |
| QStringList | checkPrerequisites (const QStringList &packages) const |
ML training script launcher.
ML-specific convenience wrapper over UTILSLIB::PythonRunner.
Adds:
Training logic lives entirely in Python (PyTorch, scikit-learn, …). No Python embedding or linkage is required.
Definition at line 76 of file ml_trainer.h.
| MLTrainer::MLTrainer | ( | ) |
Construct an MLTrainer with default PythonRunner configuration.
Definition at line 60 of file ml_trainer.cpp.
|
explicit |
Construct an MLTrainer with explicit PythonRunner configuration.
| [in] | config | PythonRunner configuration to use. |
Definition at line 67 of file ml_trainer.cpp.
| QStringList MLTrainer::checkPrerequisites | ( | const QStringList & | packages | ) | const |
Check that the required Python packages are importable.
| [in] | packages | List of package names (e.g. {"torch", "mne"}). |
Definition at line 103 of file ml_trainer.cpp.
| PythonRunnerResult MLTrainer::run | ( | const QString & | scriptPath, |
| const QStringList & | args = {} ) |
Run a training script.
If the PythonRunner is configured with a venvDir and packageDir, the venv is created/updated automatically before the script runs.
| [in] | scriptPath | Path to the .py training script. |
| [in] | args | Arguments forwarded to the script. |
Definition at line 81 of file ml_trainer.cpp.
| PythonRunner & MLTrainer::runner | ( | ) |
Access the underlying PythonRunner for callback/config changes.
Definition at line 74 of file ml_trainer.cpp.