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

fix: correct sign of periodic kernel expected gradient #936

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

rg936672
Copy link
Contributor

@rg936672 rg936672 commented Jan 23, 2025

PR Type

  • Bugfix

Description

In current main, the sign of the expected gradient for the PeriodicKernel is incorrect. However, this wasn't showing up in tests, since it was also evaluating to 0. On Jax 0.5.0, it was no longer evaluating to zero, and so started causing test failures. (See #930; this PR doesn't fix all the issues there.)

We should probably investigate why the gradient was evaluating to 0, and why it isn't doing so in jax 0.5.0!

How Has This Been Tested?

The grad_x and grad_y tests pass with jax 0.5.0. Also, the definitions now match between TestPeriodicKernel and PeriodicKernel.

Does this PR introduce a breaking change?

No.

Checklist before requesting a review

  • I have made sure that my PR is not a duplicate.
  • My code follows the style guidelines of this project.
  • I have ensured my code is easy to understand, including docstrings and comments where necessary.
  • I have performed a self-review of my code.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.
  • I have updated CHANGELOG.md, if appropriate.

Copy link
Contributor

Performance review

Commit d16a951 - Merge 3ff9268 into 8308711

No significant changes to performance.

Copy link
Contributor

Performance review

Commit 4931650 - Merge 7928834 into 8308711

No significant changes to performance.

@rg936672 rg936672 self-assigned this Jan 24, 2025
@gw265981 gw265981 self-requested a review January 24, 2025 09:36
@gw265981 gw265981 merged commit 3630ddc into main Jan 24, 2025
20 checks passed
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