-
Notifications
You must be signed in to change notification settings - Fork 394
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
Add PyTorch 2.5.1 to CI #1069
Add PyTorch 2.5.1 to CI #1069
Conversation
Drop 2.1.2, update 2.4.0 to 2.4.1
|
Protobuf still uses utcnow, which now gives a deprecation warning.
Python 3.12 requires torch >= 2.4 for compile to work.
skorch/tests/test_regressor.py
Outdated
w_list = [ | ||
warning for warning in recwarn.list | ||
if "protobuf" not in warning.message.args[0] | ||
and "utcnow" not in warning.message.args[0] | ||
] | ||
w0, w1 = w_list # one warning for train, one for valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming two warnings by coming out of this filter can be a bit flaky. Can we directly pull out the warnings from training and validation warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I thought so too. Do you have an elegant solution for that? I was wondering if there was an API for setting filters to recwarn
but I didn't see anything.
At least, with this implementation, we catch unexpected warnings ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this specific test, can we filter for the warning we want to check for and make sure there are two of them:
w_list = [
warning for warning in recwarn.list
if msg_substr in str(warning.message)
]
assert len(w_list) == 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After spending too much time fiddling with pytest.mark.filterwarnings
without success, I rewrote the filters in a similar way as you suggested to make them more robust.
weights_only
as that trips up some warning testsutcnow
by protobuftorch.compile
tests when torch < 2.4 and Python 3.12 are used, as this is not supported by torchNote that I had to upgrade torch and Python at the same time because torch 2.5 requires Python > 3.8 and because Python 3.12 requires torch > 2.1 (which is dropped in favor of 2.5).