Skip to content

ci: Test with torch nightly#707

Open
ValerianRey wants to merge 5 commits into
mainfrom
test-torchjd-with-torch-nightly
Open

ci: Test with torch nightly#707
ValerianRey wants to merge 5 commits into
mainfrom
test-torchjd-with-torch-nightly

Conversation

@ValerianRey
Copy link
Copy Markdown
Contributor

Add a CI matrix entry that installs the torch nightly build and runs the unit test suite against it.

The install-deps action gains a torch_channel input (default: stable); when set to nightly, it upgrades torch and torchvision from the PyTorch nightly CPU index after the normal install step.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ValerianRey ValerianRey added the cc: ci Conventional commit type for changes to the CI (Github workflows and actions). label May 27, 2026
@ValerianRey ValerianRey requested review from a team and PierreQuinton as code owners May 27, 2026 17:41
@ValerianRey ValerianRey added the cc: ci Conventional commit type for changes to the CI (Github workflows and actions). label May 27, 2026
@github-actions github-actions Bot changed the title Test with torch nightly ci: Test with torch nightly May 27, 2026
ValerianRey and others added 3 commits May 27, 2026 19:46
@ValerianRey ValerianRey marked this pull request as draft May 27, 2026 17:54
@ValerianRey ValerianRey marked this pull request as ready for review May 27, 2026 17:56
@ValerianRey
Copy link
Copy Markdown
Contributor Author

This seems to work (see the print in the action that shows the torch and torchvision versions).

I think we could merge this but not make it a mandatory check (i.e. not change the branch and tag rulesets) for now, because maybe the nightly version can be unstable.

shell: bash
run: |
uv pip install --pre --upgrade torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
uv run python -c "import torch, torchvision; print('torch:', torch.__version__, '| torchvision:', torchvision.__version__)"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll remove the print here right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I'd rather keep it to always be able to verify which version we actually installed (since it's not trivial and may be a source of error). This way, if the job fails, we know exactly with which version it failed.

- python-version: '3.10.0'
extra_groups: 'lower_bounds'
# Upper-bounds: torch nightly build.
- torch_channel: 'nightly'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we testing nightly with lower bounds? Does that make sense? Also I don't understand the comment above.

Copy link
Copy Markdown
Contributor Author

@ValerianRey ValerianRey May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes a lot of sense to test the compatibility of torch nightly (i.e. torch upper bound) and other libraries lower bounds. This setup should not really happen in practice.

Well, it says "Upper-bounds" because nightly is the beta (unreleased) version of pytorch (so the highest version we can get for it) and all other libraries will use the highest version that is released.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes a lot of sense to test the compatibility of torch nightly (i.e. torch upper bound) and other libraries lower bounds. This setup should not really happen in practice.

Which is why I'm confused, it looks like (line 41) we are installing lower bounds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the full file it's a lot clearer. With the way github cuts it, it's a bit confusing yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cc: ci Conventional commit type for changes to the CI (Github workflows and actions).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants