Repository navigation
Say how NEMAR cuts an analysis plan into steps (Refs #714) - #716
Conversation
… plan-first tests pass, consistency check not run: needs a model key)
…lization (tested) Short requests keep their own kinds (3 to 6 applies after kinds are chosen), the preprocess title is pinned, inspect means what the nemar_* calls could not answer, titles are examples. Tests run each example title through plan_consistency.normalize_step and check the earlier rules survived.
Constants at the top, a plain fixture instead of autouse, exact-text check only, clearer class name.
|
Review round 1: outcome for each finding. Fixes are on this branch (3 commits, pushed).
The consistency check itself still needs a model key and runs against develop after merge. |
…MAR text fixture in plan-first tests (tested)
…elog and widget docs (docs only)
|
Review round 2 outcomes (fixes in 3e3dcd7 and 66b6fb6):
Tested: |
|
PM verdict: merged into develop (squash). All acceptance criteria checked against the diff and tests; both review rounds have outcomes; all checks passed (Lint, Test 3.11, Test 3.12, Frontend Tests, Docker build, notebook site). The PR says Refs #714, so #714 stays open until the post-merge consistency report (5 requests x 4 repeats on the settled develop deployment) is posted here and on #714. The block is about 20 lines against the 10 to 15 target, which the round 2 comment justifies. |
After-merge run of the consistency check (develop 0.8.20.dev34, with #716)
What still varies:
With four repeats a share moves by one run, so 3/4 against 2/4 is within noise for any single request. Full reportNEMAR plan consistency (E2.5, #663)Deployment:
Caveats
Plans, run by runERP by condition (xx099904)
Band power (xx099906)
Epoch counts (xx099904)
Raw segment plot (xx099905)
Topography (xx099905)
Normalization rulesFirst match wins, top to bottom; title first, then detail.
|
Summary
NEMAR's analysis model proposes plans of different granularity for the same request (read, preprocess and epoch as one step or three; plot folded into compute; an extra inspection step).
This adds a short block to
plan_first_instructionsinsrc/assistants/nemar/config.yamlthat says how to cut a plan:scripts/plan_consistency.pynormalize_step: "Read the recording" and "Inspect the event names" areload, "Filter and clean the recording" isfilter, "Epoch around the events" isepoch, "Compute the band power" isspectrum, "Plot the result" isplot.RULESand the script are untouched.The block is a new numbered item before the
propose_planitem, so the later items are renumbered (4, 5, 6); their wording is unchanged. Docs (docs/community-widget.md) andCHANGELOG.mdeach get one entry.Refs #714
Not measured before merge
The plan consistency check cannot run before merge: it makes paid analysis-model calls against a deployment and needs a model key, which this branch does not have.
It will be run once on the settled develop deployment after merge and reported on this PR and on #714.
Baseline top-sequence shares from #714 on develop: ERP by condition (xx099904) 1/4, band power (xx099906) 2/4, epoch counts 4/4, raw segment 4/4, topography 4/4.
Tests
uv run pytest tests/test_agents/test_plan_first.py tests/test_api/test_propose_plan.py tests/test_scripts/test_plan_consistency.py tests/test_core/test_config -q: 710 passed, 1 skippedTestNemarPlanFirstTextcases read the realconfig.yamlthroughplan_first_section(config, "analysis", DECLARED); new router-level class intest_propose_plan.pyloads the real NEMAR text and checks it reaches the analysis prompt and not the quick oneuv run ruff check .anduv run ruff format --check .: cleanuv run pytest tests/ -q --cov(ignoringtests/test_core/test_llm_service.py, which fails to collect on the local Python 3.14 with apydantic.v1error unrelated to this change): 6145 passed, 92 skipped, 1 failed. The failure istests/test_tools/test_hed_suggest.py::test_real_program_suggests_a_schema_tag, which needs the localhed-validatornode module that is absent in this checkout; it does not touch NEMAR.