haive.core.graph.state_graph.recompilation_demo¶

Demonstration of BaseGraph2 recompilation tracking.

from typing import Any, Dict This script shows how the new recompilation tracking works and when recompilation is needed vs when it’s not.

Classes¶

ExtendedState

Extended state schema for testing.

SimpleState

Simple state schema for testing.

Functions¶

demo_recompilation_tracking()

Demonstrate recompilation tracking functionality.

demo_usage_patterns()

Show recommended usage patterns.

demo_what_needs_recompilation()

Show what changes require recompilation vs what doesn't.

main()

Run all demonstrations.

Module Contents¶

class haive.core.graph.state_graph.recompilation_demo.ExtendedState(/, **data)¶

Bases: pydantic.BaseModel

Extended state schema for testing.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

class haive.core.graph.state_graph.recompilation_demo.SimpleState(/, **data)¶

Bases: pydantic.BaseModel

Simple state schema for testing.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

haive.core.graph.state_graph.recompilation_demo.demo_recompilation_tracking()¶

Demonstrate recompilation tracking functionality.

Return type:

Any

haive.core.graph.state_graph.recompilation_demo.demo_usage_patterns()¶

Show recommended usage patterns.

Return type:

None

haive.core.graph.state_graph.recompilation_demo.demo_what_needs_recompilation()¶

Show what changes require recompilation vs what doesn’t.

Return type:

None

haive.core.graph.state_graph.recompilation_demo.main()¶

Run all demonstrations.

Return type:

Any