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_callbackreceives a native NodeTask and returns its NodeResult.artifact_callbackexports 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
TrainingResultDTO, with its typed outcome, portable package export and explicitdetach()lifecycle. It is distinct from the high-levelRunResultreturned byrun().
- nirs4all.api.dagml_training.run_host_hpo_search(dsl: Any, envelope: Any, controller_manifests: Any, request: Any, op_callback: Any, optimizer_callback: Any, *, resume_checkpoint: Any = None, progress_callback: Any = None, candidate_callback_factory: Any = None, view_callback_factory: Any = None, resume_view_validator: Any = None) dict[str, Any][source]
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.