Repository navigation
Conversation
The leg held each declared dependency at its lower bound but took every other package at its newest release, so a release anywhere could fail the required unit-tests check. .github/dependency-floors-constraints.txt now pins every package the leg installs. scripts/pin_dependency_floors.py writes it with uv pip compile, preferring the pins the file already has and then those in uv.lock, and records a hash of the pyproject.toml inputs, which the leg checks before its install. The hand pins of pytest and rich are now part of the file, at their uv.lock versions.
default-groups only chooses the groups of project commands such as uv sync, and the floor job names its groups, so a change to it no longer asks for a regeneration. The uv.lock preferences now come from every group, so they do not depend on default-groups either. The hash still leaves out [build-system]: the pins cover what the job installs, not the isolated build of the project.
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
The test of the workflow now reads only the floor leg's job: its install's requirements and --group flags must equal the script's JOB_REQUIREMENTS and GROUPS, its --constraint must name the pins file, and the pins check must run before the install. Before, it only looked for those strings anywhere in ci.yml, so an added requirement, a dropped --group video or a check moved after the install passed. The input hash test now also changes each of the job's own inputs the hash covers: its requirements, Python version and platform. The workflow comment above the pins check is gone, and the docs no longer say that a run without the file moves every pin back to uv.lock.
5 of 7 tasks
Member
Author
amazloumi
marked this pull request as ready for review
December 6, 2026 00:29
5 of 7 tasks
This was referenced Dec 6, 2026
Merged
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.
Summary
unit-tests (dependency floors)job holds each declared dependency at its lower bound (--resolution lowest-direct), but it resolved the other 102 packages it installs again on every run, each to the newest release its requirements allow, so one outside release could fail the requiredunit-testscheck. On main, 74 of those 102 are at their newest release today (a requirement holds the other 28 below theirs), and two floors runs of main four days apart installed different versions of nine of them (cryptography 50.0.2 and 51.0.1, fastapi, filelock, google-auth, idna, regex and three opentelemetry packages)..github/dependency-floors-constraints.txtnow pins all 121 packages the job installs, and the install passes it as--constraintin place of the inlinerich<14.3.4. The rest of the job and the required checks do not change.scripts/pin_dependency_floors.pywrites that file withuv pip compileof the job's install (--resolution lowest-direct, Python 3.12, x86_64 manylinux_2_28). It prefers the versions the file already pins, then those inuv.lock, and gives a declared dependency no preference, since a preference outranks lowest-direct and would move it off its bound. It records a sha256 of its inputs: what it reads frompyproject.toml(requires-python,[project].dependencies, thevideogroup, and[tool.uv], which holds torch's index, apart fromdefault-groups), and the job's own requirements and target, which are constants of the script (JOB_REQUIREMENTS,PYTHON_VERSION,PYTHON_PLATFORM), not read frompyproject.toml. A unit test ties the job inci.ymlto the script: it reads only the floors job and requires its install's requirements and--groupflags to equal the script'sJOB_REQUIREMENTSandGROUPS, its--constraintto name the file, and the pins check to run before the install.pin_dependency_floors.py --check, is a new step afteruv venvand before the install. It recomputes the hash with the standard library alone and, when an input changed since the file was written, fails with "Regenerate it withuv run python scripts/pin_dependency_floors.py". Without it, a raised floor would fail the install with a resolver error.tests/unit/test_pin_dependency_floors.pyfails the same way in every unit leg, and checks that each declared dependency is pinned at its lower bound.rich<14.3.4before, now comes from the file at itsuv.lockversion. pytest stays at 9.0.2 through the job's ownpytest>=9.0.2, a declared requirement that resolves to its bound, not throughuv.lock; the file pins it there too. Of the 102 packages beyond the declared ones, 87 take theiruv.lockversion. 11 are held elsewhere by what the floors require: torch 2.12.0 pins triton, cuDNN, NCCL and cuda-toolkit exactly, and cuda-toolkit 13.0.2 pins nvJitLink; datasets 3.5.1 caps dill and multiprocess; mlflow-skinny 3.1.0 caps cachetools, importlib-metadata and packaging; and wandb 0.17.2 keeps protobuf below 6. tzdata takes nouv.lockversion, sinceuv.lockholds it only forsys_platform == 'emscripten' or sys_platform == 'win32'. The last 3 (docker-pycreds, pytz, setproctitle) are needed only by the floors and are not inuv.lock.uv.lockwhen the job runs resolve only by moving five floors off their bounds (datasets 3.5.1 to 4.8.0, mlflow-skinny 3.1.0 to 3.13.0, pyarrow 15.0.0 to 21.0.0, torch 2.12.0 to 2.14.0, wandb 0.17.2 to 0.19.10), because the lock's versions follow the newest direct dependencies. A resolve-by-date cutoff (--exclude-newer) works with the PyTorch index, but it could not predate torchao 0.18.0, so rich would keep its hand pin; each move of the date would move every package at once; and the job would still re-resolve on every run under whatever uvsetup-uvinstalls.[build-system] requires = ["hatchling"], whichuv.lockdoes not lock), and--constraintdoes not reach that isolated build. Pinning it in this job alone would not keep the required checks green through a bad hatchling release, since lint and theuv.locklegs build the project the same way, so the hash leaves[build-system]out too. That gap is tracked in CI builds kempnerforge with whatever hatchling is newest, so one broken hatchling release can fail every required check #785.CONTRIBUTING.md(the CI table, and under Dependencies when and how to regenerate the file and how to re-derive the pins fromuv.lockwhere the floors allow it),docs/getting-started/install.md(Dependency floors) andcodebase-map.json. The workflow's comment on the old hand pins is gone, and no new comment replaces it.Testing
On CPU, with uv 0.13.8. The floor environments use CPython 3.12.16 and are built exactly as the job builds them; the
uv.lockenvironments use CPython 3.12.11 and 3.14.10. 1cc2b59 is the first commit; 0056352 leavesdefault-groupsout of the hash, which changes only the hash line of the pins file, so both install the same 122 versions. 5157baf ties the job to the script; it changes no input of the install, so it installs the same 122 versions too.uv run ruff check .anduv run ruff format --check .pass (ruff 0.15.9), at 5157bafuv run pyright kempnerforge/(not run: nokempnerforge/change)uv run pytest tests/unit/ -v --timeout=60at 1cc2b59, in the floor environment built exactly as the new job builds it: 6699 passed, 15 skipped, 1 failed. Main 3899909's floor install, built the same way in a second venv: 6668 passed, 15 skipped, 1 failed. The 31 extra passes are the cases of the new test file. The one failure is the same in both,test_pipeline_checkpoint_layouts.py::TestAcrossRanks::test_the_stages_continue_a_run_saved_without_pp[muon-pp3]hitting the 60 s limit, a known cluster-only timeout (test_streaming_resume.py's worker and multi-rank tests need more than the unit tier's 60 s on cluster CPU nodes #754). Alone with--timeout=600it passes in both environments, in 43 s and 33 s.--checkpasses, the install takes the same 122 versions as at 1cc2b59,scripts/check_dependency_floors.py --group videopasses (17 of 17 at their lower bounds), andtests/unit/test_pin_dependency_floors.pywithtests/unit/test_check_dependency_floors.pypasses there (63 passed), as it does in theuv.lockenvironments on Python 3.12 and 3.14.uv.lockalone).--checkexits 1 with the regenerate message after raising or lowering a floor, adding or removing a runtime dependency, raising thevideofloor, moving torch's index or raisingrequires-python, and exits 0 after an edit of thedevgroup,default-groupsor[build-system]; a reorder of the dependencies also exits 0 (at 1cc2b59, and in a unit test).tests/unit/test_pin_dependency_floors.pypasses (37 passed in each) in theuv.lockenvironments on Python 3.12 and 3.14 and in the floor environment, where it passes withtests/unit/test_check_dependency_floors.pytoo (67 passed).--checkand the floor check pass there, and the pins file is byte-identical to 0056352's. Each of these edits now fails a test of that file, which passes again once the edit is undone: adding"pytest-xdist>=3.6.1", or an unquotedpytest-xdist, to the install; dropping its--group videoor its--constraint; moving the pins check after the install; and dropping the job's requirements and target from the hash, with the file restamped.test_loss.py(6702 passed, 1 failed), which End finished gloo test ranks without interpreter shutdown #770 fixes; the re-run passed.uv run torchrun --nproc_per_node=4 -m pytest tests/distributed/ -v(not run: no distributed code changes)uv run pytest tests/e2e/ --e2e -v(not run: no such changes)Closes #746