-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Refactor and add more benchmarks for montecarlo #2640
Refactor and add more benchmarks for montecarlo #2640
Conversation
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
*beep* *bop* Hi, human. I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently. Please add your name and email to In case you need to map an existing alias, follow this example. |
1 similar comment
*beep* *bop* Hi, human. I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently. Please add your name and email to In case you need to map an existing alias, follow this example. |
Signed-off-by: Asish Kumar <[email protected]>
*beep* *bop* Hi, human. I'm the @tardis-bot and couldn't find your records in my database. I think we don't know each other, or you changed your credentials recently. Please add your name and email to In case you need to map an existing alias, follow this example. |
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
@officialasishkumar Can you please update the PR description, adding some details and a description of your changes? |
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
benchmarks/run_tardis.py
Outdated
|
||
def time_run_tardis(self): | ||
run_tardis(self.config, log_level="ERROR", show_progress_bars=False) | ||
run_tardis(self.path, log_level="ERROR", show_progress_bars=False) |
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.
There should be an empty line at the end of the file.
|
||
class BenchmarkTransportMontecarloMainLoop(BenchmarkBase): | ||
""" | ||
class to benchmark montecarlo_main_loop |
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.
Sorry for being too nit-picky, this can be improved.
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'm not sure in what sense. Can you please elaborate more?
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 think Atharva would like a more descriptive docstring
} | ||
) | ||
def time_kappa_calculation(self, energy): | ||
calculate_opacity.kappa_calculation(energy) |
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.
Empty line at end of file
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.
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.
Is there any vs code extension to automate this task?
assert actual == 0 | ||
else: | ||
np.sqrt(r * r - p * p) * formal_integral.C_INV * inv_t | ||
func(r, p, inv_t) | ||
|
||
@skip_benchmark | ||
@parameterize({"p": [0, 0.5, 1], "Test data": TESTDATA}) |
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.
Small question, how does "Test data"
know to send its value to test_data
?
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.
it sends data sequence wise. Parameter name is nothing to do with it.
bc2628e
to
a245a7d
Compare
b2926ad
to
c1e4c2f
Compare
Signed-off-by: Asish Kumar <[email protected]>
c1e4c2f
to
09e3032
Compare
Signed-off-by: Asish Kumar <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2640 +/- ##
==========================================
+ Coverage 67.80% 69.67% +1.87%
==========================================
Files 177 181 +4
Lines 14534 14468 -66
==========================================
+ Hits 9855 10081 +226
+ Misses 4679 4387 -292 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Asish Kumar <[email protected]>
953168a
to
5bae9d4
Compare
command: asv run refactor-benchmarks^! the benchmarks are ran on all the functions in this PR. |
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.
Good work. Please address any remaining comments!
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
dc4aa62
to
fbae4cc
Compare
Benchmark results for formal_integral functions: https://paste.opensuse.org/pastes/4983e0ca50cb |
|
||
@property | ||
def simulation_rpacket_tracking_enabled(self): | ||
config_verysimple = self.config_verysimple |
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.
(Can be future work) Setting up a separate config property or a yml file is cleaner.
📝 Description
Type: 🚀
feature
Refactor montecarlo Bencmarks and adding new benchmarks that cover most of the functions inside montecarlo.
📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label