You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: run smoke tests across a python x torch version matrix (apple#32)
* ci: run smoke tests across a python x torch version matrix
Smoke tests previously ran on one implicit torch version (whatever
pyproject.toml's unpinned bound resolved to) across all supported
python versions. Add torch_2_8/2_9/2_10/2_11 dependency groups
(build-matched torchao/torchvision per pytorch/ao issue 2919) and a
matrix.torch_group axis on the test-smoke CI job so each of the 4
torch minor versions is smoke tested independently, still covering
all 3 python versions per job via the existing nox session.
lowest_tested_torch/highest_tested_torch are renamed to torch_2_8/
torch_2_11 for a consistent naming scheme; the linux-tests/macos-tests
full-suite jobs and their Makefile targets are unchanged.
* fix: allow digits in AVAILABLE_GROUPS regex for torch_2_* group names
setup_env.sh's group discovery used grep -E '^[a-z_-]+ = \[', which
excludes digits and made torch_2_8/2_9/2_10/2_11 invisible to
validate_groups — breaking test-highest-pytorch/test-lowest-pytorch
with 'Unknown dependency group', caught by the fork CI run.
* feat: make TORCH_GROUP the single source of truth for torch pinning
setup_env.sh now reads TORCH_GROUP directly and folds it into every
sync it runs, so make env/test/test-fast/docs/etc. all pin torch
instead of floating on whatever pyproject.toml's plain bound resolves
to. test-highest-pytorch/test-lowest-pytorch/env-highest-torch lock
their group via an inline `export TORCH_GROUP=... &&` at the top of
the recipe (rather than a hardcoded --with-torch_2_X flag), so their
name stays a promise regardless of a command-line override — verified
that GNU Make's own `override` directive achieves the same lock but
trips up the mbake Makefile formatter's duplicate-target detector,
which doesn't recognize that syntax.
--with-torch_2_X stays as a guarded alternate path for direct,
non-Make invocations of setup_env.sh; a guard now errors clearly if it
disagrees with an explicitly-set TORCH_GROUP instead of surfacing a
raw uv conflicting-groups resolver error.
* refactor: read TORCH_GROUP directly in smoke tests, drop SMOKE_TEST_TORCH_GROUP
Now that the Makefile exports TORCH_GROUP unconditionally, the
smoke-test-specific SMOKE_TEST_TORCH_GROUP env var was redundant
indirection. ci/nox/noxfile.py reads TORCH_GROUP directly, and
`make test-smoke` no longer needs to translate the Makefile variable
into a differently-named env var for the nox subprocess.
* refactor(setup_env): drop bespoke TORCH_GROUP conflict guard
The custom bash check that detected TORCH_GROUP disagreeing with an
explicit --with-torch_2_X flag duplicated logic uv already provides:
`uv sync --group torch_2_11 --group torch_2_8` fails on its own with
a clear "Groups ... are incompatible with the conflicts: ..." error
and non-zero exit. Simplifies the --all-groups exclusion loop and the
plain --group append accordingly, removing the GROUP_REQUESTED/
TORCH_GROUP_ALREADY_SYNCED bookkeeping that only existed to feed it.
* refactor(nox): drop unused default for TORCH_GROUP
The Makefile always exports TORCH_GROUP before invoking nox, so the
Python-side default was dead code for every make test-smoke run;
kept only for a bare, non-Make nox invocation which isn't a supported
entrypoint.
* docs(Makefile): trim TORCH_GROUP comment
The expanded rationale duplicated what's now self-evident from
reading the three lock-target recipes directly.
* fix(Makefile): narrow TORCH_GROUP override to the setup_env.sh call only
`export TORCH_GROUP=torch_2_X && ...` set the variable for the whole
recipe's shell, which happened to be harmless since nothing else in
these three recipes reads TORCH_GROUP, but the intent was always to
scope the override to just the one setup_env.sh invocation that needs
it. Using `TORCH_GROUP=torch_2_X <command>` as an inline prefix does
that precisely: it applies only to the first command in the `&&`
chain, reverting to the Makefile's own default/command-line value for
everything after.
* refactor(Makefile): alias highest/lowest torch groups for maintainability
Add HIGHEST_TORCH_GROUP/LOWEST_TORCH_GROUP variables and route the 4
places that hardcoded torch_2_11/torch_2_8 as a stand-in for "the
extreme" (TORCH_GROUP's default, env-highest-torch, test-highest-
pytorch, test-lowest-pytorch) through them instead. Addresses PR
review feedback: bumping the project's torch version bounds now
means changing 2 lines instead of manually finding every hardcoded
reference.
apple#32 (comment)
0 commit comments