Repository navigation
task template v1: the Phase 1 template and its fixes in one branch, for one merge into main - #65
Merged
Merged
Conversation
…ate' into formulacode/paired-measure
…sts of the package that builds them When no test maps from the changed files and the patch changes C, C++, Cython, Fortran or CUDA sources, their templates or build files, pytest_runner.py runs up to 12 test files from the nearest tests folder above them (strategy compiled_fallback). test.sh rebuilds for the same file types. A runner error is written to note instead of being dropped.
In some task images pandas loads the system libstdc++ first, and the env's libicu (needed by sqlite3, which coverage imports) then fails with CXXABI_1.3.15 not found. pytest.main raised, and the runner recorded no tests.
…urvey/phase2-template-combined
…py of the package in site-packages does not hide it numpy#21464: the image has a regular numpy 1.22.3 in site-packages next to the editable repo. The runner runs as a script, so site-packages came first; a plugin imported that numpy and the repo's numpy/conftest.py then failed with ImportPathMismatchError (0 tests).
…p timing when benchmarks still import it
…te-shadow-conftest
…late-shadow-conftest
…late-shadow-conftest
…1-template-shadow-conftest
…ree with the same command at the same path
…so a huge merged .git does not stop setup
… Python processes)
…on disk; fix the ref check that never failed
task image: remove git history after HEAD on the Phase 1 template branch
… install it and retry Discovery errors name the module (No module named X, pandas optional deps, geopandas spatial index). Up to 3 rounds; installs pin every installed version and prefer releases from before the base commit date. Folders in the repo that ship the module (MDAnalysis testsuite) are installed editable. What was added is written to added_deps.json and lsv_init_results.json.
…e commit before the baseline base_restore.json lists, per task, the oracle files that the base image's build script edited (49 of the 58 survey tasks that end base_edited). The task image restores them, rebuilds the package, and fails the build if a file is still edited. Tasks not in the list render as before.
task template: restore files a stored build script edited, before the baseline
task image: install the modules benchmark discovery lacks and retry discovery
With tests/confirm.json, test.sh times again, in the same container and inside the measure gate, the benchmarks whose first-pass median log speedup is beyond theta plus the oracle's improved ones. lsv_measure.py gets --only and --out.
template: confirmation pass with more paired rounds on unsure benchmarks
This was referenced Oct 19, 2026
…job can release its leases
…rds.py (no behavior change)
This was referenced Oct 19, 2026
Merged
… not stop the survey)
…k), not the HTTP gate
…ward.json records lsv_skipped
…edited_before and edited_overlap to the measure block
…is hashed, not parsed)
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.
Purpose
The task template that built and measured the Phase 1 survey was on unmerged branches, so
maindoes not build the same tasks.mainalso pins an lsv commit (cab3cc8) that is not on lsvmain. This PR puts the whole template on one branch, somaincan take it in one merge. New task builds use the tagtemplate-v1.4on this branch.How it works
release/template-v1starts atsurvey/phase1-template-20261008(head of #56). Thenmainand the open template PRs were merged into it in stack order, as local merges. None of those PRs was merged on GitHub.Changes
--onlysqlite3before pandas, repo package before site-packages, check for a shadowed project--basetempin the container, and compares committed changes against the base commitLSV_REF→ lsv9702a48(lsv#10: copysys.modulesbefore the extension scan), then lsv909ec2fin change 5parser.pymarksreward.txtas not used for training, and the paired timing mergeEnv image build uses the pinned lsv and snapshot-tester (tag
template-v1).docker/templates/docker_build_final.shinstalls lsv and snapshot-tester at the same commits asLSV_REFandSNAPSHOT_TESTER_REF.Gate lease id in the log (tag
template-v1.1).setup.shandtest.shwrite each acquire tomeasure_gate.txtas<step> <lease id> 1|0.<step> 1|0, so the leases of a stopped job stayed until their time limit.Shorter comments (tag
template-v1.2).parser.py,lsv_measure.pyandrecords.pyare 1 or 2 lines.LSV_REF→ lsv909ec2f(tagtemplate-v1.3).template-v1.2pinned lsv9702a48, which stopped the survey in that case. Between the two lsv commits onlysurvey.py(2 lines) and its test change.Measure gate is a lock folder of slot files, not the HTTP gate (tag
template-v1.4).tests/measure_lock.shtakes a free slot withflock -nand tries again every 2 seconds.setup.shandtest.shload it withsource.lsv_init(init),lsv_measure(measure), the confirmation pass (confirm), and snapshots plus pytest (tests).mg_releasecallsflock -ubefore it closes the file descriptor, so a process that the step left running does not keep the slot. The kernel also frees the slot when the trial process stops.FC_MEASURE_LOCK_DIR(default/fc-measure-lock) andFC_MEASURE_LOCK_WAITin seconds (default 7200, the same limit as the old acquire).<step> <slot file name> 1tomeasure_gate.txt. A folder without slot files, or a wait past the limit, writes<step> none 0at once or after the wait, so the readers drop the trial as ungated as before.curlcalledMEASURE_GATE_URLto acquire and release a lease, and a stopped job kept its leases until their time limit.FC_SKIP_LSVflag intest.sh(tagtemplate-v1.4).FC_SKIP_PYTESTandFC_SKIP_SNAPSHOT, before the profile.d files are sourced.1,test.shdoes not runlsv_measureor the confirmation pass, and writeslsv_skipped.json.parser.pythen writesreward.jsonwithlsv_skippedset, no speedups, and the pytest and snapshot results.Precheck fields in the image build check (tag
template-v1.4).apply_oracle_patch.pyaddsby_deps,always_affected,edited_beforeandedited_overlaptopatch_info.json, andemit_measure.pycopies them intomanifest["verify"].verify/in_image/coverage_check.pyon measurement: timing, noise rule and precheck in a new package; task image builds as a runner; short prompts by default #66. The hunk header parser (old_ranges,overlapping) moved in unchanged.by_depscounts the benchmarks that LSV selects from the deps database oflsv_init, through a file that the patch changes, without the always affected benchmarks. A separate git index of the starting tree keeps the image's own edits out of that file list.LSV_REF→ lsv6858286(tagtemplate-v1.4).*.profdump that an agent leaves in the repo) is hashed, not parsed.909ec2fraisedSyntaxErroron such a file. Between the two lsv commits onlyprocess_code.py(7 lines) and a new test change.Not included:
mainalready has them.Usage
Render and build from the latest tag:
Verification
Run again on the current head (
0e244db, tagtemplate-v1.2):template-v1.environment/DockerfilepinsLSV_REF=909ec2fandSNAPSHOT_TESTER_REF=f08bb0c. The env image build script uses the same commits.After the
LSV_REFchange (head3f4bc00, tagtemplate-v1.3):pytest -q tests/docker: 453 passed, 10 skipped.On head
4bf55df(tagtemplate-v1.4):test_measure_lock.py(slot held and freed, a second trial takes the other slot, all slots busy waits then runs ungated, a missing or empty folder logs ungated at once). TheFC_SKIP_LSVtests are intest_template_skip_flags.py. The precheck field tests repeat the cases oftests/verify/test_precheck.pyfrom measurement: timing, noise rule and precheck in a new package; task image builds as a runner; short prompts by default #66.pytest test/test_lightspeed_survey.py test/test_lightspeed_binary_file.pygave 5 passed. The lsv CI fails onmaintoo, in upstream asv tests.Notes
template-v1totemplate-v1.4point at commits on this branch. They stay valid after a merge.git merge-treeoftemplate-v1.4with measurement: timing, noise rule and precheck in a new package; task image builds as a runner; short prompts by default #66 and task template: restore test files before tests, and run the changed package's tests folder #68 gives no conflicts.MEASURE_GATE_URL. They must mount the lock folder at/fc-measure-lockinstead. That change comes in a later PR.