Add stricter type checking and expected matrix sizes#42
Merged
gpleiss merged 75 commits intocornellius-gp:mainfrom May 2, 2023
Merged
Add stricter type checking and expected matrix sizes#42gpleiss merged 75 commits intocornellius-gp:mainfrom
gpleiss merged 75 commits intocornellius-gp:mainfrom
Conversation
added 30 commits
November 9, 2022 13:31
- Pull requests run a single type checked test (for speed reasons) - Pushes to main and releases run all type checked tests (for completeness)
gpleiss
approved these changes
May 2, 2023
Member
|
Finally got this in! Thanks @corwinjoy ! |
Contributor
Author
|
Awesome! Thanks so much for reviewing, polishing and merging this @gpleiss. I know it was a lot to review! |
Balandat
added a commit
to Balandat/linear_operator
that referenced
this pull request
May 3, 2023
Repeat of cornellius-gp#51, as this snuck in with cornellius-gp#42.
gpleiss
pushed a commit
that referenced
this pull request
May 3, 2023
Collaborator
|
Hmm @gpleiss I might have missed this, but it looks like |
Balandat
added a commit
to Balandat/linear_operator
that referenced
this pull request
May 3, 2023
See cornellius-gp#42 (comment) ALso removes the `packaging` dep, this is transitive through `pytest`: https://github.com/pytest-dev/pytest/blob/main/setup.cfg#L48
Balandat
added a commit
that referenced
this pull request
May 3, 2023
* Make jaxtyping and typeguard required dependencies See #42 (comment) ALso removes the `packaging` dep, this is transitive through `pytest`: https://github.com/pytest-dev/pytest/blob/main/setup.cfg#L48 * Make typeguard an "test" dep only (I don't think it's needed at runtime, is it?) * Remove typeguard dep (transitive via jaxtyping) * Add typeguard restriction to <3.0.0 back in
Balandat
reviewed
May 3, 2023
|
|
||
| def _size(self) -> torch.Size: | ||
| return self._diag.shape + self._diag.shape[-1:] | ||
| return torch.Size([*self._diag.shape, self._diag.shape[-1]]) |
Collaborator
There was a problem hiding this comment.
This change broke the case where self._diag is a scalar tensor. Will put up a fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As per the discussion: cornellius-gp/gpytorch#2180
I have upgraded the library to use Jaxtyping.
This allows a couple things:
Issues: