Release v0.4.0 — heat-rod MPC control + PINA 0.3 / pydantic-ai 2.x#35
Merged
Conversation
…deps): upgrade lockfile README now leads with the multi-agent PINA team (pydantic-graph + MLflow + marimo chat / A2A / AG-UI) instead of selling 'reactive notebooks'. New hero, features, and a verified agentic quickstart (lead_chat / FlowDeps / mo.ui.chat, the marimo-flow CLI, and the A2A/AG-UI servers). Corrects provenance table count 13 -> 16 and drops the stray 'serena' from the core MCP server list (it's only an extra .vscode/mcp.json entry). Deps: uv lock --upgrade pulls latest within existing >= floors (pydantic-ai/-graph 1.84 -> 1.106, torch 2.11 -> 2.12, mlflow 3.11 -> 3.13, transformers 5.5 -> 5.10, marimo 0.23.1 -> 0.23.9). Full suite green: 226 passed, 1 xfailed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…e: clean up docs + metadata Resolves every deprecation warning surfaced by the 1.84->1.106 pydantic-ai / pydantic-graph bump — full suite stays green (225 passed, 0 xfailed, 0 warnings) and `ruff check` is clean. Graph runner: - build_graph() now uses the builder-based GraphBuilder API; the nine v1 BaseNode nodes are registered as-is via g.node(...) (BaseNode/End/ GraphRunContext survive into pydantic-graph v2). - New agents.runner.run_graph drives the run (graph.run / graph.iter) and logs FlowState snapshots to MLflow under agent_state/. Drops MLflowStatePersistence — the builder runner has no persistence hook. Toolsets / servers: - MCP builders -> MCPToolset (from MCPServerStreamableHTTP/MCPServerStdio). - A2A -> fasta2a.pydantic_ai.agent_to_a2a; AG-UI -> bare Starlette + AGUIAdapter.dispatch_request (the AG-UI ASGI test un-xfails). - mlflow.pydantic_ai.autolog() on by default (mlflow >= 3.11.2 fixed the circular-ref crash); opt out via MLFLOW_PYDANTIC_AI_AUTOLOG=0. Docs / metadata: - Fixed stale counts (provenance 13 -> 16 tables; tests -> 225/0 xfailed). - pyproject description + keywords reframed agentic-first; GitHub About updated to match. CHANGELOG [Unreleased] documents the migration. - Cleared pre-existing ruff findings (typer B008 via extend-immutable-calls, SIM300, B017) exposed by the ruff bump. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
mlflow.pytorch autolog reloads the trained checkpoint with torch.load(weights_only=True) (the torch>=2.6 default). PINA checkpoints embed LabelTensor instances, so the reload raised 'Weights only load failed: Unsupported global pina.label_tensor.LabelTensor' and the model artifact was never captured. Register LabelTensor via torch.serialization.add_safe_globals at training-module import (idempotent). Verified: torch.load(weights_only=True) of a real run checkpoint now succeeds; full suite stays green (225 passed). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…shboard The provenance preset_problems table has no 'payload' column (it stores the composition under 'spec_json'). The 3D-preset-preview cell only runs once a real preset exists, so the wrong column name stayed latent until an actual agent run populated the catalog — then it raised 'Binder Error: Referenced column "payload" not found'. All five example notebooks now build via 'marimo export html' (01 needs --no-sandbox / the project env due to its PEP723 header). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
mlflow 3.13's pydantic-ai integration lags pydantic-ai 1.106: it logs an ERROR importing the moved pydantic_ai._tool_manager.ToolManager (only the ToolManager span-type label is lost; tracing is otherwise intact) and emits Agent(instrument=...) / AgentRunResult.usage() deprecation warnings from its own autolog code. Enable autolog with silent=True to mute mlflow's wrapped logs, plus a message-scoped filter for the one raw Agent(instrument=...) warning that still escapes (we never pass instrument= ourselves). Verified: 0 autolog noise lines, tracing still works. Drop once mlflow catches up. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Add a controllable 1D heat-rod plant + reduced-order surrogates so the MPC loop can plan against a trained PINN field model: - heat_rod.py: FTCS ground-truth plant (FiniteDifferenceHeatRod, with a stability guard), step-dataset generator, MLP ROM (train_step_surrogate), and build_heat_rod_problem_spec — a parametric PINN problem T(x,t,u) with the right-boundary temperature T(1,t,u)=u as the control input. - pinn_surrogate.py: PINN field-mean -> scalar rollout surrogate (make_pinn_rollout_surrogate / register_pinn_surrogate) for horizon planning. - Composition-first control inputs: ControlParameterSpec + ProblemSpec.control_parameters (merged into domain_bounds, sampled during training) and a parametric_dirichlet ConditionSpec.kind pinning an output field to a sampled input axis. - register_pinn_surrogate_tool on the control toolset; lazy imports in the toolset break the control<->schemas import cycle. - Functional tests (real MPC steps, real training) + demo notebook 04 reuses build_heat_rod_problem_spec. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PINA 0.2.6 -> 0.3.1 renamed several public symbols and tightened discretise_domain. Migrate all call sites so pytest is warning-free again: - DomainInterface: import from pina.domain (submodule path removed). - FixedValue: import from pina.equation.zoo. - AbstractProblem -> BaseProblem. - PINN-family solvers aliased to their renamed *SingleModelSolver forms, keeping the short domain names (PINN, SAPINN, ...) in registry + annotations. - discretise_domain no longer accepts domains="all"; drop the arg so the default samples all domains (fixes KeyError: 'all' during training). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- README: high-level architecture diagram (natural language -> pydantic-ai multi-agent team -> PINA / MLflow / marimo), a consolidated Stack table, and a Claude Code integration section (marimo MCP server + marimo-pair live-kernel workflow). Bump test count 225 -> 232. - .marimo.toml: update the in-notebook AI assistant config (agent mode, Ollama devstral models, polars/plotly/mlflow rules). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
- Bump version 0.3.1 -> 0.4.0. - pyproject: add explicit fasta2a dep, drop the removed a2a extra, bump pydantic-ai-slim floor to >=2.10.0 ([ag-ui] retained). - uv.lock: refresh via uv lock --upgrade (pydantic-ai 2.10, torch 2.13, transformers 5.13, PINA 0.3.1, plus transitive bumps). - CHANGELOG: cut the 0.4.0 section. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
astral-sh/setup-uv publishes moving major tags only up to v7; the v8 line
exists solely as exact releases, so `@v8` fails to resolve ("unable to find
version v8") and blocked every workflow run. Pin to the latest v8 release,
preserving the Node-24 intent of the earlier majors bump.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the 0.4.0 release.
Highlights
FiniteDifferenceHeatRod, FTCS + stability guard), parametric PINN problemT(x,t,u)withT(1,t,u)=uas the control input, MLP ROM + PINN field-mean rollout surrogate for horizon planning. New composition-first primitives:ControlParameterSpec/ProblemSpec.control_parametersand aparametric_dirichletcondition kind.DomainInterface→pina.domain,FixedValue→pina.equation.zoo,AbstractProblem→BaseProblem, PINN-family solver renames aliased back to short names, anddiscretise_domain(domains="all")dropped (default samples all).pytestwarning-free again.uv lock --upgrade: pydantic-ai 1.84→2.10 (a2a extra dropped →fasta2anow an explicit dep), torch 2.11→2.13, transformers 5.5→5.13, PINA 0.2.6→0.3.1, mlflow 3.11→3.13, plus transitive bumps.Breaking (dependency majors)
fasta2are-add.Verification
ruff check— cleanpytest— 232 passed, 0 warningsuv build— sdist + wheel built as0.4.0After merge
Tag
v0.4.0onmainand cut the GitHub Release (triggerspython-publish.yml→ PyPI + Docker).🤖 Generated with Claude Code