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

Bring model.to in line with PyTorch module.to (bc) #133

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Conversation

RunDevelopment
Copy link
Member

This makes the behavior of our model.to the same as PyTorch's module.to. This is a breaking change, because we previously interpreted string arguments differently.

I had to add typing_extensions as a dependency, because I needed Self (py >=3.11) to get the return type of to right.

Other changes:

  • I noticed that the return types of cuda and cpu were wrong and changed them to Self.
  • I noticed that the inferred return types of eval and train did not show up in the docs, and add Self as the return type.

@joeyballentine joeyballentine merged commit 46b8f3f into main Jan 20, 2024
7 checks passed
@joeyballentine joeyballentine deleted the pytrorch-to branch January 20, 2024 00:14
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