-
Notifications
You must be signed in to change notification settings - Fork 2
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
docs: reordered docs for solvers and kernels #759
base: main
Are you sure you want to change the base?
Conversation
Performance reviewNo significant changes to performance. |
@db091756 merge conflict to resolve. I haven't started reviewing yet. |
Performance reviewNo significant changes to performance. |
Performance reviewNo significant changes to performance. |
Performance reviewNo significant changes to performance. |
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.
I've requested a few documentation fixes local to what you've been working on. We probably shouldn't propagate them too widely, in order to keep this PR focussed.
Performance reviewStatistically significant changes
Normalisation values for new data: |
Performance reviewNo significant changes to performance. |
Merged with main, fixed those docs problems and a some small missed issues with the jaxtyping PR. Also fixed a |
Performance reviewNo significant changes to performance. |
2 similar comments
Performance reviewNo significant changes to performance. |
Performance reviewNo significant changes to performance. |
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.
You only need to reply to my duplicate comments once. I've put one on each line to make sure they're not missed.
@@ -162,25 +163,25 @@ def __check_init__(self): | |||
raise ValueError("'output_scale' must be positive") | |||
|
|||
@override | |||
def compute_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | |||
def compute_elementwise(self, x, y): |
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.
Why remove annotations?
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.
The override inherits the type hints, and these ArrayLike
type hints are now incorrect. If I wanted to include the correct ones here I would need to include every single override for every single kernel function which would add 100s of lines unnecessarily
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.
Unfortunately, this doesn't work with Sphinx for me. Take a look at the compiled documentation. Does it work for you?
coreax/kernels/scalar_valued.py
Outdated
return self.output_scale * jnp.exp( | ||
-jnp.linalg.norm(jnp.subtract(x, y)) / (2 * self.length_scale**2) | ||
) | ||
|
||
@override | ||
def grad_x_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | ||
def grad_x_elementwise(self, x, y): |
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.
Why remove annotations?
return -self.grad_y_elementwise(x, y) | ||
|
||
@override | ||
def grad_y_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | ||
def grad_y_elementwise(self, x, y): |
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.
Why remove annotations?
@@ -664,19 +670,19 @@ def __check_init__(self): | |||
raise ValueError("'output_scale' must be positive") | |||
|
|||
@override | |||
def compute_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | |||
def compute_elementwise(self, x, y): |
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.
Why remove annotations?
return self.output_scale / ( | ||
1 | ||
- 2 * self.index * jnp.cos(jnp.linalg.norm(jnp.subtract(x, y))) | ||
+ self.index**2 | ||
) | ||
|
||
@override | ||
def grad_x_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | ||
def grad_x_elementwise(self, x, y): |
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.
Why remove annotations?
return -self.grad_y_elementwise(x, y) | ||
|
||
@override | ||
def grad_y_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | ||
def grad_y_elementwise(self, x, y): |
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.
Why remove annotations?
@@ -686,7 +692,7 @@ def grad_y_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | |||
) ** 2 | |||
|
|||
@override | |||
def divergence_x_grad_y_elementwise(self, x: ArrayLike, y: ArrayLike) -> Array: | |||
def divergence_x_grad_y_elementwise(self, x, y): |
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.
Why remove annotations?
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.
Just the conversation regarding overrides and annotations remaining.
PR Type
Description
Reordered docs for solvers and kernels
How Has This Been Tested?
Does this PR introduce a breaking change?
(Write your answer here.)
Screenshots
(Write your answer here.)
Checklist before requesting a review