base#

Registered post-MIP node contracts and campaign flow compilation.

Classes

Functions

compile_post_mip_flows

Compile configured flows into validated single-parent dynamic stages.

post_mip_node

render_post_mip_node_report

Render one node using the report hook owned by its registered class.

class CompiledPostMIPNode#

Bases: object

__init__(flow_id, node_id, stage_id, node_type, input_id, parent_stage_id, dependency_stage_ids, model_source, config, capabilities, input_artifact, output_artifact, metric_references)#
Parameters:
  • flow_id (str)

  • node_id (str)

  • stage_id (str)

  • node_type (str)

  • input_id (str)

  • parent_stage_id (str)

  • dependency_stage_ids (tuple[str, ...])

  • model_source (str)

  • config (dict[str, Any])

  • capabilities (NodeCapabilities)

  • input_artifact (str)

  • output_artifact (str)

  • metric_references (tuple[str, ...])

Return type:

None

capabilities: NodeCapabilities#
config: dict[str, Any]#
dependency_stage_ids: tuple[str, ...]#
flow_id: str#
input_artifact: str#
input_id: str#
metric_references: tuple[str, ...]#
model_source: str#
node_id: str#
node_type: str#
output_artifact: str#
parent_stage_id: str#
stage_id: str#
class NodeCapabilities#

Bases: object

__init__(kind, accepts, output=None, distributed=False, implemented=True, default_strategy='single')#
Parameters:
Return type:

None

accepts: frozenset[ArtifactKind]#
default_strategy: str = 'single'#
distributed: bool = False#
implemented: bool = True#
kind: NodeKind#
output: ArtifactKind | None = None#
class NodeKind#

Bases: str, Enum

EVALUATOR = 'evaluator'#
SELECTOR = 'selector'#
TRANSFORMER = 'transformer'#
__new__(value)#
class PostMIPNode#

Bases: ABC

capabilities: ClassVar[NodeCapabilities]#
common_fields: ClassVar[frozenset[str]] = frozenset({'config', 'failure_policy', 'input', 'model_source', 'type'})#
classmethod metric_references(config)#
Parameters:

config (Mapping[str, Any])

Return type:

tuple[str, …]

classmethod render_report(node, payload)#

Return a report fragment, or None for DAG-only node types.

Parameters:
Return type:

str | None

type_name: ClassVar[str]#
classmethod validate_config(config)#
Parameters:

config (Mapping[str, Any])

Return type:

None

compile_post_mip_flows(config)#

Compile configured flows into validated single-parent dynamic stages.

Parameters:

config (Mapping[str, Any])

Return type:

tuple[CompiledPostMIPNode, …]

post_mip_node(cls)#
Parameters:

cls (type[PostMIPNode])

Return type:

type[PostMIPNode]

render_post_mip_node_report(node, payload)#

Render one node using the report hook owned by its registered class.

Parameters:
Return type:

str | None