-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update to PyTorch 2.2 #52
Conversation
p.set_yticks(p.get_yticks()) | ||
p.set_yticklabels([_rename(item.get_text()) for item in p.get_yticklabels()]) | ||
|
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.
This is suppressing a warning about setting yticklabels without setting ticks
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.
Thanks for looking into this Andrew, pleased with the approach we've converged to (and learned a few things about deepcopy and pickling in the process).
I'll leave merging to you in case there are any other adjustments
A number of changes needed to work with PT2.2+. Primarily, there's now (since commit) no good way to intercept module calls, so we instead replace all
nn.Module
s with trivial subclasses, making them "user" modules.Passes tests on asses tests on 2.1,2.2 (stable),2.4 (nightly) and
examples/scale_analysis.py
produces identical output (with torch.manual_seed).This implementation is somewhat faster, as it does less work in the patched
forward
functions.One source of changes is that the node naming post 2.2 better reflects the input code.
For example, input code
Became, pre 2.2, where the variable names are derived from the operator:
and are now