Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies: torch 1.9+ required #936

Closed
wants to merge 4 commits into from

Conversation

adamjstewart
Copy link
Collaborator

#927 uses torch.linalg.vector_norm, which requires torch 1.9+. This wasn't caught in CI because the tests weren't run after #918 was merged.

P.S. We should require all tests to pass before a PR can be merged. Let me know if you need help updating the branch protection rules.

@qubvel
Copy link
Collaborator

qubvel commented Oct 7, 2024

Thanks!

It looks like dims=None is not supported even in torch 1.9, we should probably revert to if/else statement in the loss

@adamjstewart
Copy link
Collaborator Author

Looks like 1.9.0 also has issues. Do these make sense to anyone? I'll keep bumping the min version until it works, but let me know if these make sense.

@adamjstewart
Copy link
Collaborator Author

Possibly related to #937

@qubvel
Copy link
Collaborator

qubvel commented Oct 7, 2024

Torch 1.9 + dims fix looks fine, loss tests passed for minimal version
https://github.com/qubvel-org/segmentation_models.pytorch/actions/runs/11212688281/job/31164191825?pr=937

@qubvel
Copy link
Collaborator

qubvel commented Oct 7, 2024

We can just merge #937

@adamjstewart adamjstewart deleted the deps/min-torch branch October 7, 2024 10:06
@adamjstewart
Copy link
Collaborator Author

Do you want to make all tests required now? This will force even older PRs to be rerun before merging.

@qubvel
Copy link
Collaborator

qubvel commented Oct 7, 2024

Can you provide a bit more details? I was actually thinking about reducing the number of platforms in PRs, or maybe conditioning it on some label, but not sure how this can be implemented 🙂
e.g. run tests for all Python on ubuntu, but macos and windows only for the latest python, then run everything on main.

@adamjstewart
Copy link
Collaborator Author

Can you provide a bit more details?

Basically, make main a protected branch that can only be merged to when a certain set of CI tests pass.

run tests for all Python on ubuntu, but macos and windows only for the latest python, then run everything on main.

You can either include or exclude certain combinations until you get the desired result. But I wouldn't worry too much about the additional CI time, it's free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants