Skip to content

Conversation

@teubert
Copy link
Collaborator

@teubert teubert commented May 19, 2023

Update noise functions to apply noise inplace instead of creating a new object. The result is that this operation will be quicker

@github-actions
Copy link

Thank you for opening this PR. Each PR into dev requires a code review. For the code review, look at the following:

  • Reviewer (someone other than author) should look for bugs, efficiency, readability, testing, and coverage in examples (if relevant).
  • Ensure that each PR adding a new feature should include a test verifying that feature.
  • All errors from static analysis must be resolved.
  • Review the test coverage reports (if there is a change) - will be added as comment on PR if there is a change
  • Review the software benchmarking results (if there is a change) - will be added as comment on PR
  • Any added dependencies are included in requirements.txt, setup.py, and dev_guide.rst (this document)
  • All warnings from static analysis must be reviewed and resolved - if deemed appropriate.

@github-actions
Copy link

Benchmarking Results
From:

Test Time (s)
import main 0.13102330000000006
import thrown object 0.5132448999999999
model initialization 0.12215889999999985
set noise 0.619515
simulate 0.2981739000000001
simulate with saving 0.9476546000000003
simulate with saving, dt 1.0341370000000003
simulate with printing results, dt 1.2424767
Plot results 14.907948200000002
Metrics 0.035403699999999816
Surrogate Model Generation 3.213050199999998
surrogate sim 1.1048641000000003
surrogate sim, dt 2.9791168
To:
Test Time (s)
--- ---
import main 0.12914899999999996
import thrown object 0.5061929000000001
model initialization 0.12025449999999993
set noise 0.6494559999999998
simulate 0.29730769999999973
simulate with saving 0.9458700999999996
simulate with saving, dt 1.0429357000000006
simulate with printing results, dt 1.2519
Plot results 14.6549135
Metrics 0.03556090000000012
Surrogate Model Generation 3.334836599999999
surrogate sim 1.1013827999999997
surrogate sim, dt 2.9855771000000004

@codecov-commenter
Copy link

Codecov Report

Merging #533 (6c29829) into dev (15ef14f) will decrease coverage by 0.29%.
The diff coverage is 51.72%.

@@            Coverage Diff             @@
##              dev     #533      +/-   ##
==========================================
- Coverage   79.83%   79.54%   -0.29%     
==========================================
  Files          30       30              
  Lines        2405     2420      +15     
==========================================
+ Hits         1920     1925       +5     
- Misses        485      495      +10     
Impacted Files Coverage Δ
src/prog_models/utils/noise_functions.py 58.82% <51.72%> (-20.13%) ⬇️

@teubert teubert requested a review from mstraut May 19, 2023 19:16
Copy link
Contributor

@mstraut mstraut left a comment

Choose a reason for hiding this comment

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

It looks good. It's keeping consistent with other functions that update the object's matrix.

@teubert teubert merged commit 86ec6f9 into dev May 22, 2023
@teubert teubert deleted the feature/inplace_noise branch May 22, 2023 20:54
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.

4 participants