Repository navigation
Add Moli version success and resource comparison #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
556bb12
Add Moli version resource comparison chart
c1a8fcb
Harden Moli resource chart rendering
7c6d811
Validate Moli chart resource population
bab0050
Fit single-metric Moli chart legends
a578eb0
Reserve space for single-metric legends
0a3581b
Validate Moli chart configuration schema
16a9419
Generalize Moli comparison chart
04d149d
Validate Moli chart inputs safely
c791f1e
Validate Moli chart cohort metadata
4d08653
Validate Moli chart resource values
97e035c
Document Moli 1.1.9 benchmark method
4478097
Clarify Moli resource chart population
f1274ca
Clarify adaptive Moli resource accounting
a2be828
Defer Moli 1.1.9 release note until publication
bffff93
Support RSS and CPU resource comparison charts
c99eb28
Track reproducible Moli fixed-layout comparison report
d24bee3
Bind fixed results to current task contracts and validate chart metrics
4ae3af2
Fix mobile evidence layout and run browser checks in ESM project
e8e97f9
Record published Moli 1.1.9 fixed-layout comparison
d2e30fc
Clarify report population mapping and historical publication binding
20e9380
Unify six Moli configurations and streamline the reader-facing report
c71ff22
Bind the published six-configuration report and cover single-metric c…
6bcbff6
Preserve report language during hosted hash navigation
074fe6a
Bind the verified hosted-navigation report release
b103a63
Calibrate Moli release resources and publish seven configurations
18c5254
Align Moli release resource measurements and seven-method report
bdc489b
Document fixed-only Moli runs and remove retry chart example
fda4695
Share report byte packing and clarify chart schema mapping
c2c599e
Declare the shared reporting package explicitly
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| { | ||
| "schema": "moli_report_profile/1", | ||
| "functional_population": { | ||
| "cases": 372, | ||
| "attempts_per_case": 3, | ||
| "rule": "all_three_attempts_pass" | ||
| }, | ||
| "resource_population": { | ||
| "tasks": 557, | ||
| "attempts_per_task": 5, | ||
| "chart_tasks": 209, | ||
| "chart_calls": 1045 | ||
| }, | ||
| "method_ids": [ | ||
| "114_off", | ||
| "118_off", | ||
| "118_on", | ||
| "119_official_off", | ||
| "119_official_on", | ||
| "119_off", | ||
| "119_on" | ||
| ], | ||
| "resource_method_ids": [ | ||
| "119_official_off", | ||
| "119_official_on", | ||
| "119_off", | ||
| "119_on" | ||
| ], | ||
| "publication": { | ||
| "base_url": "https://artifact-site.lexmount.cn", | ||
| "slug": "gdwtSGOel0va", | ||
| "kind": "folder", | ||
| "expected_version": "ver_460f324bc0c04d53a866517db54edd13", | ||
| "share_url": "https://artifact-site.lexmount.cn/v/w1vgSkFJjvmCL6kPaHmj4K8sUZ8iTI8t" | ||
| }, | ||
| "resource_builds": { | ||
| "119_official_off": { | ||
| "sha256": "4a10cfab1d743ff327d6e1d5e1a7a8702bed5d869544089ef7df231b0e3b453a", | ||
| "source_commit": "47512623315aa9b57edc2ef721a033b6b8d91063", | ||
| "profile": "release", | ||
| "target": "aarch64-unknown-linux-gnu" | ||
| }, | ||
| "119_official_on": { | ||
| "sha256": "4a10cfab1d743ff327d6e1d5e1a7a8702bed5d869544089ef7df231b0e3b453a", | ||
| "source_commit": "47512623315aa9b57edc2ef721a033b6b8d91063", | ||
| "profile": "release", | ||
| "target": "aarch64-unknown-linux-gnu" | ||
| }, | ||
| "119_off": { | ||
| "sha256": "568874d3f943957e003e6c7ca34163372c1d3df8823431377037dfae86d99cbd", | ||
| "source_commit": "f315ff26ed6222603d382b8f7a4648157da3ebf9", | ||
| "profile": "release", | ||
| "target": "aarch64-unknown-linux-gnu" | ||
| }, | ||
| "119_on": { | ||
| "sha256": "568874d3f943957e003e6c7ca34163372c1d3df8823431377037dfae86d99cbd", | ||
| "source_commit": "f315ff26ed6222603d382b8f7a4648157da3ebf9", | ||
| "profile": "release", | ||
| "target": "aarch64-unknown-linux-gnu" | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| """Shared, benchmark-independent report infrastructure.""" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| """Deterministic byte packs shared by static report publishers. | ||
|
|
||
| Adapters own routes, privacy projection and MIME metadata. This layer only stores | ||
| ordered byte blocks and returns byte-exact locations for their existing loaders. | ||
| """ | ||
| from __future__ import annotations | ||
|
|
||
| import gzip | ||
| from collections.abc import Iterable | ||
| from pathlib import Path | ||
|
|
||
|
|
||
| def write_packs( | ||
| blocks: Iterable[tuple[str, bytes]], | ||
| destination: Path, | ||
| *, | ||
| limit: int, | ||
| pattern: str, | ||
| compresslevel: int, | ||
| ) -> tuple[dict[str, dict], int]: | ||
| if limit <= 0: | ||
| raise ValueError("pack limit must be positive") | ||
| catalog: dict[str, dict] = {} | ||
| payload = bytearray() | ||
| pending: list[str] = [] | ||
| index = 0 | ||
|
|
||
| def flush(): | ||
| nonlocal index, payload, pending | ||
| if not pending: | ||
| return | ||
| relative = Path(pattern.format(index=index)) | ||
| if relative.is_absolute() or ".." in relative.parts: | ||
| raise ValueError("pack path must stay inside the destination") | ||
| path = destination / relative | ||
| path.parent.mkdir(parents=True, exist_ok=True) | ||
| # Refuse accidental replacement if a naming pattern repeats. | ||
| with path.open("xb") as stream: | ||
| stream.write(gzip.compress(bytes(payload), compresslevel=compresslevel, mtime=0)) | ||
| for key in pending: | ||
| catalog[key] = {"pack": relative.as_posix(), **catalog[key]} | ||
| index += 1 | ||
| payload = bytearray() | ||
| pending = [] | ||
|
|
||
| for key, data in blocks: | ||
| if key in catalog: | ||
| raise ValueError(f"duplicate block: {key}") | ||
| if pending and len(payload) + len(data) > limit: | ||
| flush() | ||
| catalog[key] = {"offset": len(payload), "size": len(data)} | ||
| payload.extend(data) | ||
| pending.append(key) | ||
| flush() | ||
| return catalog, index |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Build and verify the Moli report | ||
|
|
||
| This directory owns the Moli comparison report renderer. Measured evidence stays outside Git under `BROWSER_EVAL_DATA_HOME` (default: `~/.browser-eval`). It does not use the Web Fetch publication target. | ||
|
|
||
| The frozen Linux runner is read from `LEXBENCH_REPORT_RUNNER_ROOT` (default: `$BROWSER_EVAL_DATA_HOME/work/moli-1.1.8-failures-linux`). Its recorded resource-calibration helper verifies the profiler-off and profiler-on pairs. All seven resource configurations use Linux ARM64 release binaries, PSS and process-tree CPU measurements in Docker on the Mac host. | ||
|
|
||
| The report profile and chart payload have separate schemas. In `moli_report_profile/1`, resource `tasks` and `attempts_per_task` map to the chart's `total_tasks` and `calls_per_task`; `chart_tasks` and `chart_calls` retain their names. The builder validates the measured populations before constructing the chart payload. Do not pass the profile directly to the plotting API. | ||
|
|
||
| Build from validated fixed-layout functional summaries and the complete resource profile directory: | ||
|
|
||
| ```sh | ||
| uv run --frozen python scripts/moli_report/build.py \ | ||
| --output /tmp/moli-report-release \ | ||
| --fixed-summary 119_off /path/to/patched-off-summary.json \ | ||
| --fixed-summary 119_on /path/to/patched-on-summary.json \ | ||
| --fixed-summary 119_official_off /path/to/official-off-summary.json \ | ||
| --fixed-summary 119_official_on /path/to/official-on-summary.json \ | ||
| --linux-resource-profiles /path/to/completed-linux-resource-profiles | ||
| uv run --frozen python scripts/moli_report/verify.py --site /tmp/moli-report-release --release | ||
| ``` | ||
|
|
||
| Choose a new output directory for each build; the builder does not delete existing output. `--vendor-dir` selects the retained Mermaid distribution and license. Their hashes are checked before copying. The default location is the original report asset directory under the data home; no vendored executable or measured output is committed here. | ||
|
|
||
| The four 1.1.9 resource configurations are release builds bound by `resource_builds` in `evaluation/moli/current-report.json`. Functional evidence binds its own binary identity. Do not relabel retained functional outcomes as a new build's measured accuracy. | ||
|
|
||
| `uv run --frozen python -m scripts.moli_report.run_linux_resource_profiles --protocol /path/to/frozen-protocol.json --output /path/to/new-evidence-directory` executes the unchanged Lexbench driver and resource collector. Freeze 557 task definitions, fixtures, runner files, four binary hashes, five attempts, jobs=1, the seed and the 250 ms interval before execution. Each configuration has an independent container; all runs execute serially. The official profiler-off calibration precedes the profiler-on measurement. Resource values come from the latter. The builder verifies all 11,140 measured calls and their calibration pairs, checks the frozen 1,045-call chart population, recomputes aggregates and rejects missing or changed evidence. Keep all measured files outside Git. | ||
|
|
||
| The static verifier checks score/evidence bindings, resource populations and percentages, fixed-case log links, charts, bilingual rendering, unique resource extrema and negative controls. It invokes the same JavaScript rendering checks used by `tests/test_moli_report_render_contract.py`. | ||
|
|
||
| For full release verification, serve the build with a static HTTP server and run `ui_check.js` with `MOLI_REPORT_SITE`, `MOLI_REPORT_ORIGIN`, and `MOLI_REPORT_SHOTS`. `LEXBENCH_NODE_MODULES` selects the provisioned Playwright installation. The browser check covers route classes, themes, widths, evidence dialogs and keyboard navigation. Run it after resource measurement to avoid contaminating the measurement host. | ||
|
|
||
| Publish only after the complete requested method matrix and release checks pass, using the existing bound Artifact Site target and its freshly read remote version. Preserve binary identity, raw trials and previous report versions. | ||
|
|
||
| Package the validated tree with `uv run --frozen python scripts/moli_report/pack.py --source /tmp/moli-report-release --output /tmp/moli-report-package`. The packer retains both English entry paths and checks bytes through the bundle manifest; it refuses symlinks, hidden paths, and existing destinations. Run the browser release check against this packaged directory before uploading: serve the package at `MOLI_REPORT_ORIGIN`, while `MOLI_REPORT_SITE` points to the validated unpacked tree that supplies the reference model. The browser checks include the complete resource matrix and frozen measurement-script evidence in both languages. | ||
|
|
||
| ## Shared implementation boundary | ||
|
|
||
| Moli and Web Fetch publishers use `harness/reporting/packs.py` for deterministic gzip packing and byte offsets. Their adapters retain different entry points and catalogs: Moli serves case evidence through fetch, while Web Fetch packs virtual HTML routes and applies its own privacy projection. The shared packer accepts ordered bytes and neither selects evidence nor changes it. Round-trip tests cover both filename/compression formats, binary and Unicode content, empty files and pack boundaries; publisher tests verify their public catalogs independently. | ||
|
|
||
| Moli's scorer bindings, 372-case matrix and source manifests remain in this adapter because they are specific to this benchmark. The renderer is not a second Web Fetch scorer. Common code is extracted where both reports actually use the same operation, rather than introducing a generic renderer with benchmark-specific branches. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Moli compatibility and resource comparison | ||
|
|
||
| The report compares seven fixed configurations: Moli 1.1.4 with layout off, Moli 1.1.8 with layout off and on, Moli 1.1.9 with layout off and on, and patched Moli 1.1.9 with layout off and on. Success rates use the same 372 cases failed by Moli 0.1.1. A case passes only when all three attempts pass. Moli 1.1.4 uses a direct check of the sole candidate and 371 inherited failures, explicitly identified in the report. | ||
|
|
||
| Resources use a separate 557-task experiment, five calls per task. Each configuration has 2,785 measured calls, paired with the official profiler-off calibration. The chart and overview table use the 1,045-call, 209-task population frozen before execution; the detailed tables also report all 557 tasks. Passing and failing calls remain in both declared populations. | ||
|
|
||
| All seven resource configurations run in Docker Linux on the Mac host, using Linux ARM64 release binaries and process-tree PSS and CPU measurements. Resource changes use Moli 1.1.4 with layout off as the baseline. Success-rate changes use percentage points. Functional results retain their own binary identities; patched functional outcomes use commit 87c87e95, while patched resource measurements use the f315ff26 release build. The report does not treat these resource runs as new accuracy measurements. | ||
|
|
||
| Open index.html through a static HTTP server. Chinese and English routes share the same report model and evidence. Charts are rendered by the included Python script; memory and CPU panels can be selected independently. Per-task results retain exact program errors and sanitized grader, output, and protocol logs. | ||
|
|
||
| New benchmark runs select a fixed `--moli-layout off` (default) or `--moli-layout on` for every attempt. Failed cases keep the selected layout and repetition count. The harness does not schedule layout recovery or replace results from a second batch. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.