Pure-virtual MLLIB::MlModel interface that every MLLIB inference backend implements. More...
#include "ml_global.h"#include "ml_types.h"#include "ml_tensor.h"#include <QSharedPointer>#include <QString>

Go to the source code of this file.
Classes | |
| class | MLLIB::MlModel |
| Backend-agnostic inference interface: load, predict, save plus model/task descriptors. More... | |
Namespaces | |
| namespace | MLLIB |
| Tensors, model abstraction, ONNX Runtime inference and Python training drivers used across mne-cpp. | |
Pure-virtual MLLIB::MlModel interface that every MLLIB inference backend implements.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
MLLIB::MlModel is the polymorphic seam between mne-cpp application code and the underlying runtime that actually executes a graph (ONNX Runtime today, potentially LibTorch or a native kernel tomorrow). The interface intentionally exposes only four operations
predict, save, load and the modelType / taskType descriptors - so any backend can be slotted in without leaking runtime-specific types into the public API.Inputs and outputs flow through MLLIB::MlTensor, the shared N-dimensional float32 carrier, which gives ONNX Runtime a zero-copy path into its own tensor representation while keeping Eigen-based pre/post-processing in mne-cpp idiomatic. Implementations are expected to be cheap to copy-by-shared-pointer (see SPtr) so models can be parked on UI threads and invoked from worker threads without ownership questions.
Definition in file ml_model.h.