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

Prevent DataMisfitController scheduler from modifying EKP obs_noise_cov #338

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

costachris
Copy link
Member

@costachris costachris commented Oct 22, 2023

posdef_correct was modifying inputs in-place due to the for loop over diagonal elements in the symmetric matrix case. This resulted in the DMC scheduler directly modifying the EKP obs_noise_cov matrix in the first iteration. This PR:

  1. Uses deepcopy to prevent in-place modification of the EKP obs_noise_cov and modify tests to detect this.
  2. Exports posdef_correct for external use.

Note: examples/LearningRateSchedulers is using UniformScaling and remains unaffected.

@costachris costachris changed the title Prevent DataMisfitController scheduler from modifying ekp.inv_sqrt_noise Prevent DataMisfitController scheduler from modifying inv_sqrt_noise Oct 22, 2023
@costachris costachris added the bug Something isn't working label Oct 22, 2023
@costachris costachris changed the title Prevent DataMisfitController scheduler from modifying inv_sqrt_noise Prevent DataMisfitController scheduler from modifying EKP obs_noise_cov Oct 22, 2023
Copy link
Collaborator

@odunbar odunbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! good find

@costachris
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 23, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 8f8539e into main Oct 23, 2023
13 checks passed
@bors bors bot deleted the fix_dmc_bug branch October 23, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants