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

Hotfix gradient with cache intermediates #58

Merged
merged 3 commits into from
Mar 5, 2021

Conversation

thangleiter
Copy link
Member

If calling infidelity and then infidelity_derivative, the control matrix is cached during the first call, but not the intermediates. This leads to an exception when gradient.calculate_control_matrix_derivative_from_scratch() tries to access the intermediates (since PulseSequence.get_filter_function_derivative() passes them along).

@codecov
Copy link

codecov bot commented Mar 5, 2021

Codecov Report

Merging #58 (de02256) into master (cde8258) will increase coverage by 0.22%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #58      +/-   ##
==========================================
+ Coverage   97.04%   97.27%   +0.22%     
==========================================
  Files           9        9              
  Lines        2203     2203              
  Branches      499      499              
==========================================
+ Hits         2138     2143       +5     
+ Misses         29       26       -3     
+ Partials       36       34       -2     
Impacted Files Coverage Δ
filter_functions/numeric.py 94.82% <66.66%> (ø)
filter_functions/gradient.py 100.00% <100.00%> (+4.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cde8258...de02256. Read the comment docs.

@thangleiter thangleiter merged commit dc1ccd2 into master Mar 5, 2021
@thangleiter thangleiter deleted the hotfix/cache_intermediates_gradient branch March 5, 2021 09:11
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.

1 participant