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)
Sidecar seam — the
/traincall. Wraps MLSidecar from@memberjunction/predictive-studio-sidecarin production; tests inject a fake that returns a canned TrainResponse and captures the request so the test can assert the matrix/preprocessing/holdout shape sent to the sidecar.