nirs4all.api.dagml_training module

Public native training and host HPO for explicitly supplied controllers.

nirs4all.api.dagml_training.execute_training(request: Any, data_envelopes: Any, relations: Any, training_influence: Any, op_callback: Any, *, outcome_id: str, run_id: str, bundle_id: str, warnings: Any = (), diagnostics: Any = None, artifact_callback: Any | None = None) → Any[source]

Execute a signed native DAG request with the caller’s controller.

Named data envelopes, relations and training influence are native DAG-ML contracts. op_callback receives a native NodeTask and returns its NodeResult. artifact_callback exports RAW fitted model bytes and can hydrate/release them for replay. Controllers may execute in Python or forward these frames to a persistent R or Octave process.

DAG-ML validates the contracts and owns CV, nested OOF, selection, REFIT and lifecycle. Arguments, native errors and the result pass through unchanged. This entry point neither builds contracts nor runs numerical kernels or another execution engine.

Returns:

The native DAG-ML TrainingResult DTO, with its typed outcome, portable package export and explicit detach() lifecycle. It is distinct from the high-level RunResult returned by run().

Run native FIT_CV trials with host optimizer and controller callbacks.

Supply the pipeline DSL, signed envelope, trusted controller manifests and native HPO request. DAG-ML owns folds, nested OOF, objective scores, selection and checkpoint validation. Host callbacks propose parameters and execute the scheduled tasks, including through external processes.

Resume checkpoints, progress and candidate-local controller/generated view factories retain the public DAG-ML semantics. The trial budget is the target total across resumed calls; this search performs no REFIT. All inputs and native errors pass through unchanged.

Returns:

The native search dictionary, including trial evidence and selected proposal; durable searches also include status and checkpoint.