nirs4all.api.general_transfer module
Frozen preprocessing primitives for captured-host transfer training.
These are scientific host estimators, not an execution engine. The DAG still owns training tasks. Frozen state is copied privately before use, and only the new final estimator receives a fit on the new training partition.
- class nirs4all.api.general_transfer.BoundTransferOperator(operator: Any)[source]
Bases:
objectTyped process-local binding, never a JSON-reconstructible fitted object.
- class nirs4all.api.general_transfer.FrozenTransferTransform(fitted: Any, state_fingerprint: str | None = None)[source]
Bases:
TransformerMixin,BaseEstimatorApply a captured transformation without fitting it on transfer data.
- fit(X: Any, y: Any = None) FrozenTransferTransform[source]
- nirs4all.api.general_transfer.bind_transfer_operators(nodes: dict[str, dict[str, Any]], steps: list[Any]) None[source]
Attach frozen host objects after compilation, preserving native identity.
The in-process full-train executor alone owns this binding. Its compiled JSON graph contains constructor specs and fingerprints, never pickle bytes or object handles usable by another process. No normal operator is replaced.
- nirs4all.api.general_transfer.fresh_training_estimator(estimator: Any) Any[source]
Remove our deliberate transfer freezes before a subsequent full retrain.
- nirs4all.api.general_transfer.transfer_training_steps(estimator: Any, target: Any, new_model: Any = None) list[dict[str, Any]][source]
Freeze the captured X/y transforms and initialize a fresh final model.
Only the recorded sklearn pipeline boundary is used to separate a final estimator from preprocessing. Prediction-only fusion wrappers are not guessed into a training graph.