nirs4all.pipeline.dagml.torch_estimator module
Cloneable DAG host for the PyTorch models accepted by the legacy controller.
Factories cross the DAG JSON boundary by import path. Caller-supplied module templates cross it as trusted cloudpickle bytes, so initial weights and custom constructor state are preserved. Each fit creates a fresh module.
- nirs4all.pipeline.dagml.torch_estimator.prepare_torch_runtime(pipeline: Any) None[source]
Initialize Torch optimizer imports before entering native callbacks.
Torch lazily imports Dynamo when an optimizer is constructed. Prepare its optional native dependencies before global TensorFlow seeding and before Rust schedules model callbacks. Inspect declarations without constructing components, so their constructors still observe the requested global seed.