ci: wire up Codecov uploads and update CODEOWNERS - #143
Conversation
The Codecov app is installed but receives nothing. pyproject's pytest addopts already run --cov=nvsubquadratic --cov-report=term, so coverage is computed on every gpu-tests run and then discarded to the log. Two things made this non-obvious. pytest runs inside the CI container via `docker run --rm`, so a report written in the container disappears with it — the coverage directory has to be a bind mount. And the image runs as USER ubuntu (Dockerfile:218), whose uid need not match the runner's, so the mount point is chmod 777 rather than relying on a uid match. Only --cov-report=xml is added on the command line; --cov and the term report stay in pyproject so local runs are unchanged and CI logs keep the summary. The upload is deliberately incapable of failing the job: `continue-on-error` plus `fail_ci_if_error: false`. gpu-tests is a required status check that takes ~36 minutes on a single self-hosted runner, and a Codecov outage or a missing CODECOV_TOKEN is not worth blocking a merge over. If the token secret is absent the action falls back to tokenless upload, which works for public repos. Also gitignores the `coverage/` directory the job creates in the workspace; .gitignore already covered `.coverage` and a bare `coverage.xml` but not the directory. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Farhad Ramezanghorbani <farhadr@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe GPU test workflow now generates an XML coverage report in a mounted directory and uploads it to Codecov without failing the workflow. Git ignores the coverage directory. CODEOWNERS now assigns owners to subquadratic-ops paths and tests. ChangesGPU coverage reporting
Subquadratic-ops ownership
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The PR adds non-blocking coverage reporting and ownership metadata without a supported merge-blocking behavior change. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
@moradza maintains the upstream subquadratic-ops package, so a change to the wrapper layer that binds to it — dtype/shape marshalling, the arch gating, the torch.compile lowering he rewrote — should reach him automatically rather than by someone remembering to add him. He is listed alongside the default owners rather than instead of them. GitHub requires an approving review from at least one codeowner per changed file, so this auto-requests his review without making him a hard blocker when he is away, and without preventing @farhadrgh from self-approving. Listing @moradza alone on a line would make his approval mandatory for that path; the comment in the file records that as the deliberate alternative. Verified: @moradza has write access, and all 12 paths exist at this commit. Bundled with the Codecov change because gpu-tests.yml has a bare `pull_request:` trigger with no path filter, so every PR — including a CODEOWNERS-only one — costs a ~36-minute run on the single self-hosted runner. Two config PRs would pay that twice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Farhad Ramezanghorbani <farhadr@nvidia.com>
Adds ownership for the two experiment families: - ImageNet / ViT5 (benchmarks/vit5_imagenet, examples/imagenet_classification, examples/vit5_imagenet, the profiling report, and the two imagenet datamodules) -> @Dafidofff and @moradza. - Spatial recall (examples/spatial_recall_{1d,2d,3d,v2}, reports/spatial_recall, spatial_recall_dataset.py and its motion test) -> @dwromero and @Dafidofff. All 13 paths verified to exist at this commit. As with the subq-ops rules, each line lists the new owners ALONGSIDE the defaults, so their review is auto-requested without making any one person a merge blocker. Two things recorded in the file because both fail silently: - @dwromero and @Dafidofff currently have `read` access. GitHub ignores a CODEOWNERS entry for a user without write access — no auto-request, no required review, and no hard error. These rules stay inert until someone grants them write. @moradza already has it. - @Dafidofff is David Wessels. A separate @dwessels account exists and is not him; naming it would produce a rule that never fires. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Farhad Ramezanghorbani <farhadr@nvidia.com>
gpu-tests has a bare `pull_request:` trigger, so a PR touching only docs or repo config costs ~36 minutes on the single self-hosted runner. PR #142 (.coderabbit.yaml + a template) and #143 (CODEOWNERS + .gitignore) both paid it. The obvious fix is wrong, and the file already says so at the top: `gpu-tests` is a required status check, and a path-filtered required check never reports on non-matching PRs, leaving them unmergeable forever. So the job still runs on every PR and still reports; what it skips is the expensive work. A scope step diffs against the PR base and gates the buildx/GHCR/build/pytest/CP steps. Fail-safe by construction: the suite is skipped only when EVERY changed file matches a known-inert pattern, so an unrecognised path — a new source directory, say — always runs. This workflow itself, Dockerfile, pyproject.toml and requirements* are deliberately not inert. Implemented with shell `case` globs rather than a regex. The first version used `grep -qvE` and appeared to misclassify mixed docs+source PRs as skippable. That turned out to be a local artifact — `grep` on this workstation is a function wrapping ugrep, which returns 1 from `-v` even when it matches — but the lesson stands: logic guarding a required check should not depend on which grep the runner provides. Verified by extracting the step's actual script and running it against real inputs: docs+source, PR #143's file list, Dockerfile, pyproject, requirements and an unknown path all produce needed=true; PR #142's list, docs-only and README-only produce needed=false. Also requires fetch-depth: 0 on checkout so the base diff resolves. Signed-off-by: Farhad Ramezanghorbani <farhadr@nvidia.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Codecov app is installed but receives nothing. pyproject's pytest addopts already run --cov=nvsubquadratic --cov-report=term, so coverage is computed on every gpu-tests run and then discarded to the log.
Two things made this non-obvious. pytest runs inside the CI container via
docker run --rm, so a report written in the container disappears with it — the coverage directory has to be a bind mount. And the image runs as USER ubuntu (Dockerfile:218), whose uid need not match the runner's, so the mount point is chmod 777 rather than relying on a uid match.Only --cov-report=xml is added on the command line; --cov and the term report stay in pyproject so local runs are unchanged and CI logs keep the summary.
The upload is deliberately incapable of failing the job:
continue-on-errorplusfail_ci_if_error: false. gpu-tests is a required status check that takes ~36 minutes on a single self-hosted runner, and a Codecov outage or a missing CODECOV_TOKEN is not worth blocking a merge over. If the token secret is absent the action falls back to tokenless upload, which works for public repos.Also gitignores the
coverage/directory the job creates in the workspace; .gitignore already covered.coverageand a barecoverage.xmlbut not the directory.Summary
Environment setup
Create the conda environment (required to run tests):
Test plan
pre-commit run --all-filespasses (pre-commit installif not yet set up).pytest tests/).Documentation checklist
For every new or modified public symbol in
nvsubquadratic/orexperiments/:Args:andReturns:blocks with tensor shapes where applicable.r"""..."""(required by ruff D301).docs-tracker.mdwith status[x].Summary by CodeRabbit
Tests
Chores