an MLSidecar instance (managed or remote); defaults to the
shared, process-lifetime instance from MLSidecarProvider
Train a model from an assembled feature matrix. The implementation is responsible for sidecar lifecycle (start/connect); the engine only calls this method.
The engine carves the locked holdout (plan §8.2) in TypeScript before
calling this — req.data contains ONLY the training portion (the rows the
model may train and tune on). The locked-holdout rows travel separately in
the optional second argument so the sidecar scores them exactly once and
returns holdout_metrics; they never enter req.data. Keeping the holdout
out of the public TrainRequest shape preserves that contract while
making the carve auditable and deterministic on the orchestrator side.
the fully-built train request (training matrix + schema + preprocessing + validation)
OptionallockedHoldout: MatrixDatathe carved-off holdout matrix to score exactly once (optional)
ISidecarTrainer backed by the self-managing MLSidecar client. Lazily starts the sidecar on first use (managed or remote mode is decided by
MLSidecarfrom options/env). Defaults to the process-shared MLSidecarProvider instance rather than constructing a privateMLSidecar— see that class's doc comment for why a per-instance sidecar leaked a Python child process per action run. Tests (and callers that genuinely need an isolated sidecar) can still inject their own via the constructor parameter.