nirs4all.pipeline.dagml.methods_multimodal module

Declarative SDK bridge for the closed native four-source early-fusion profile.

IO owns alignment and source descriptors, DAG-ML owns the campaign, and Methods owns every learned encoder and predictor. This module performs no encoding.

class nirs4all.pipeline.dagml.methods_multimodal.MethodsMultimodalRunResult(projected: RunResult, *, outcome: Any, package: Any, audit: Any, request: Any, training_inputs: Any)[source]

Bases: RunResult

Scored public result retaining complete native portable state only.

classes_: np.ndarray
classification: dict[str, Any]
classification_probability_blocks: list[dict[str, Any]]
close() → None[source]

Training controllers have already released their native handles.

export(output_path: str | Path, format: str = 'n4a', source: dict[str, Any] | None = None, chain_id: str | None = None, *, compatibility: str | None = None) → Path[source]

Publish the captured encoder/Ridge state without training again.

methods_multimodal_search_request: dict[str, Any]
methods_multimodal_tuning_evidence: dict[str, Any]
structural_tuning_training_outcome: dict[str, Any]
structural_tuning_training_request: dict[str, Any]
nirs4all.pipeline.dagml.methods_multimodal.bind_methods_dsl(dsl: dict[str, Any], model: MultimodalRegressor, cohort: Any) → dict[str, Any][source]

Replace a single host declaration with the independently attested native operator.

nirs4all.pipeline.dagml.methods_multimodal.controller_for_graph(graph: Mapping[str, Any], cohort: Any, *, allow_fit: bool, node_params: Any = None, binding_source_ids: Any = None, binding_controller_id: str | None = None) → Any[source]

Create the installed DAG controller, with explicit native binding source IDs.

nirs4all.pipeline.dagml.methods_multimodal.controller_sources(cohort: Any, schemas: Mapping[str, Any]) → dict[str, Any][source]

Pass raw IO blocks and their exact independently derived descriptors.

nirs4all.pipeline.dagml.methods_multimodal.execute_methods_training(*, spectro: Any, identity: Any, envelope: dict[str, Any], request: dict[str, Any], data_envelopes: dict[str, Any], influence: dict[str, Any], output: dict[str, Any], name: str, binding_source_ids: list[str]) → MethodsMultimodalRunResult[source]

Capture the same complete portable winner for fixed and structural campaigns.

nirs4all.pipeline.dagml.methods_multimodal.fit_declared_methods_model(model: MultimodalRegressor, blocks: list[Any], y: Any, *, source_schemas: Any) → None[source]

Fit a native candidate and replace the previous predictor only on success.

nirs4all.pipeline.dagml.methods_multimodal.is_methods_multimodal_package(package: Mapping[str, Any]) → bool[source]

Recognize the additive portable kind; native validation grants trust.

nirs4all.pipeline.dagml.methods_multimodal.methods_input_blocks(blocks: Mapping[str, Any], source_schemas: Mapping[str, Any]) → dict[str, Any][source]

Use lossless object storage for canonically declared mixed metadata.

NumPy text widths belong to host storage. Only an existing object schema permits this conversion; every captured descriptor and category stays exact.

nirs4all.pipeline.dagml.methods_multimodal.methods_model_in_pipeline(pipeline: Any) → MultimodalRegressor | MultimodalClassifier | None[source]

Find an explicitly selected Methods backend, including generated recipes.

nirs4all.pipeline.dagml.methods_multimodal.predict_methods_multimodal_archive(path: str | Path, data: Any, *, methods_library_path: str, outcome_id: str, run_id: str) → tuple[ndarray, dict[str, Any]][source]

Replay current raw sources through the validated package without FIT/HPO.

nirs4all.pipeline.dagml.methods_multimodal.recipe_from_estimator(model: MultimodalRegressor, *, allow_source_selection: bool = False) → dict[str, Any][source]

Translate the supported sklearn declarations without fitting them.

nirs4all.pipeline.dagml.methods_multimodal.run_methods_multimodal(pipeline: Any, spectro: Any, *, name: str, random_state: int | None, refit: bool) → MethodsMultimodalRunResult[source]

Execute the common native CV/SELECT/REFIT campaign with raw-source callbacks.

nirs4all.pipeline.dagml.methods_multimodal.source_schemas_from_cohort(cohort: Any) → dict[str, Any][source]

Capture exact IO schema identities independently of learned native state.

nirs4all.pipeline.dagml.methods_multimodal.validate_training_profile(pipeline: Any, cohort: Any, *, refit: bool, allow_source_selection: bool = False) → tuple[list[Any], Any, MultimodalRegressor][source]

Refuse unsupported campaigns before either grid or global HPO fits.