phenotypic.tune.build_pipeline#

phenotypic.tune.build_pipeline(base: ImagePipeline, params: dict[str, Any]) ImagePipeline[source]#

Clone base, overlay params, and drop __enabled__=False ops.

Parameters:
  • base (ImagePipeline) – The base pipeline embedded in the TuningSpec.

  • params (dict[str, Any]) – A flat combo ({root-relative-key: value}) from a strategy.

Returns:

A new ImagePipeline carrying the base’s measurements/post/qc with the tuned operations.

Raises:
  • IndexError / ValueError – Propagated from key parsing (out-of-range position/index, class mismatch, empty nested slot, malformed key).

  • ValidationError – When a sampled value violates the leaf op’s own bounds (the apply-time backstop), wrapped to name the knob key + op class — for both flat and nested leaves.

Return type:

ImagePipeline