feat(stats): smoke frame suite + per-stat CI perf report (#920)#921
feat(stats): smoke frame suite + per-stat CI perf report (#920)#921paddymul wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb932c63c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| from buckaroo.pluggable_analysis_framework.perf_smoke import perf_smoke_test | ||
| from buckaroo.pluggable_analysis_framework.perf_smoke import ( | ||
| SMOKE_FRAME_MAKERS, measurements_markdown, perf_smoke_test, run_perf_smoke) |
There was a problem hiding this comment.
Import only symbols that perf_smoke exports
In the current tree this test module fails during collection because buckaroo/pluggable_analysis_framework/perf_smoke.py does not define SMOKE_FRAME_MAKERS, measurements_markdown, or run_perf_smoke; it only exposes the existing perf_smoke_test path. Any pytest tests/unit/perf_smoke_test.py run will stop with an ImportError before exercising the added tests, so these expectations need to land with the corresponding production API changes or be adjusted to the existing interface.
Useful? React with 👍 / 👎.
📦 TestPyPI package publishedpip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27466342860or with uv: uv pip install --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo==0.14.20.dev27466342860MCP server for Claude Codeclaude mcp add buckaroo-table -- uvx --from "buckaroo[mcp]==0.14.20.dev27466342860" --index-strategy unsafe-best-match --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ buckaroo-table📖 Docs preview🎨 Storybook preview⏱️ Perf smoke report |
…(3.14 has no xorq)
…elta, period, date/time/binary, uint, inf, big python ints, list<string>)
Addresses items 1 and 2 of #920.
Dataset variety.
perf_smoke_testnow runs over a suite of named frames instead of just the base synthetic frame. The suite covers the shapes with bug history: unhashable object cells (perf: DefaultSummaryStats O(n²) on object columns with unhashable values (lists/dicts/sets) #843), int64 beyond 2^53 (Xorq stats fail silently on int64 values > 2^53 (JSON-safe-integer limit) #800, Histogram computation crashes on large integers near 2^53 (float64 precision loss) #632), Decimal columns (Polars histogram stat fails silently on Decimal columns (DDD weird_types) #801), tz-aware datetimes (Failing on time zone information #277), all-null columns, and categorical dtype.SmokeFindinggains aframefield so a finding says which shape triggered it.CI report. The harness now collects a per-call measurement for every stat (not just limit exceedances), exposed via
run_perf_smoke() -> SmokeResult. A newStats / Perf Smoke ReportCI job runsscripts/perf_smoke_report.pyoverPD_ANALYSIS_V2, appends a per-stat worst-case time / peak-memory table to the job summary, and fails only on the loose smoke limits.Item 3 of #920 (smoke-testing stats added at runtime via
add_stat/add_analysis/ project stat dirs) is deliberately left out: it touchesstat_pipeline.pyandanalysis_management.py, which #912 is rewriting. It stays tracked on #920.First commit is the failing tests (TDD); implementation follows after CI shows the failure.
🤖 Generated with Claude Code
Update: now also covers polars and xorq (toward #920 item "where are the stats for polars and xorq"):
_NativePeak): on Linux via the kernel's VmHWM counter reset through/proc/self/clear_refs(exact, dependency-free), elsewhere via a psutil sampling thread. A memory finding fires when either signal exceeds the limit; the report table gains a "worst native peak" column. Verified: a 32MB polars Rust-side allocation invisible to tracemalloc is flagged.StatPipeline, sorun_perf_smokeis now engine-agnostic (duck-typed frame size + canonical ops) andperf_smoke_pl.PL_SMOKE_FRAME_MAKERSmirrors the frame suite viapl.from_pandas(unhashable becomes nativeList/Struct, Decimal becomespl.Decimal).perf_smoke_xorq.run_xorq_perf_smokemeasures each batch stat as its own single-expression aggregate (per-stat engine time/memory attribution) and runs the fullXorqStatPipelineper column for post-batch stats likehistogram, which execute real queries inside their func.