-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
[Restructure/plasma] estimator cleanup #2675
[Restructure/plasma] estimator cleanup #2675
Conversation
…ace.py, transport_montecarlo_numba_interface.py, conftest.py, formal_integral.py, base.py, and macro_atom.py
*beep* *bop* Significantly changed benchmarks: All benchmarks: All benchmarks:
| Change | Before [5e7a23be] <master> | After [7d8e6e04] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| | 2.95±1μs | 2.49±0.8μs | ~0.85 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000.0, 255.5) |
| | 2.99±1μs | 2.26±0.7μs | ~0.76 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000.0, 511.0) |
| | 2.65±0.8μs | 2.48±0.8μs | 0.94 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000.0, 5110000000.0) |
| | 2.59±0.8μs | 2.57±0.8μs | 0.99 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000000000.0, 255.5) |
| | 2.83±1μs | 3.16±0.9μs | ~1.12 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000000000.0, 511.0) |
| | 3.10±1μs | 2.67±0.9μs | ~0.86 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(100000000000.0, 5110000000.0) |
| | 3.01±1μs | 2.54±0.8μs | ~0.85 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(1000000000000000.0, 255.5) |
| | 2.57±0.8μs | 2.31±0.7μs | ~0.90 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(1000000000000000.0, 511.0) |
| | 2.99±1μs | 2.59±0.8μs | ~0.87 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation(1000000000000000.0, 5110000000.0) |
| | 10.7±5μs | 5.02±2μs | ~0.47 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 255.5, 'Iron_group_fraction': 0.0}) |
| | 9.28±4μs | 5.28±2μs | ~0.57 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 255.5, 'Iron_group_fraction': 0.5}) |
| | 6.33±3μs | 5.32±2μs | ~0.84 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 511.0, 'Iron_group_fraction': 0.5}) |
| | 6.17±3μs | 5.03±2μs | ~0.82 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 5110000000.0, 'Iron_group_fraction': 0.0}) |
| | 6.89±3μs | 5.51±2μs | ~0.80 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation({'Ejecta_density': 100000.0, 'Energy': 255.5, 'Iron_group_fraction': 1.0}) |
| | 8.00±3μs | 5.41±2μs | ~0.68 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 255.5, 'Iron_group_fraction': 0.0}) |
| | 6.84±3μs | 5.31±2μs | ~0.78 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 255.5, 'Iron_group_fraction': 0.5}) |
| | 9.36±4μs | 5.85±2μs | ~0.62 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 511.0, 'Iron_group_fraction': 0.5}) |
| | 7.08±3μs | 4.73±2μs | ~0.67 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation({'Ejecta_density': 0.01, 'Energy': 5110000000.0, 'Iron_group_fraction': 0.0}) |
| | 6.24±3μs | 5.34±2μs | ~0.86 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation({'Ejecta_density': 100000.0, 'Energy': 255.5, 'Iron_group_fraction': 1.0}) |
| | 1.46±0.01s | 1.42±0.01s | 0.97 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 1.44±0.01s | 1.45±0s | 1.01 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 40.3±0.08s | 39.5±0.05s | 0.98 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 2.14±0m | 2.13±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 3.46±1μs | 6.87±3μs | ~1.98 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body({'nu': 100000000000000.0, 'temperature': 10000.0}) |
| | 80.0±20μs | 65.3±20μs | ~0.82 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 84.9±20μs | 72.4±10μs | ~0.85 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line({'packet': {'nu_line': 0.1, 'is_last_line': True}, 'enable_full_relativity': True}) |
| | 71.1±10μs | 71.9±10μs | 1.01 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line({'packet': {'nu_line': 0.2, 'is_last_line': False}, 'enable_full_relativity': True}) |
| | 80.3±20μs | 106±20μs | ~1.31 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators({'cur_line_id': 0, 'distance_trace': 0, 'time_explosion': 52000000.0, 'enable_full_relativity': True}) |
| | 78.3±20μs | 86.9±20μs | ~1.11 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators({'cur_line_id': 0, 'distance_trace': 1000000000000.0, 'time_explosion': 52000000.0, 'enable_full_relativity': True}) |
| | 77.5±20μs | 87.9±20μs | ~1.13 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators({'cur_line_id': 1, 'distance_trace': 100000.0, 'time_explosion': 10000000000.0, 'enable_full_relativity': False}) |
| | 7.74±0.03s | 7.81±0s | 1.01 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission({'mu': 0.8599443103322428, 'emission_line_id': 1000, 'energy': 0.9114437898710559}) |
| | 7.66±0.01s | 7.75±0.01s | 1.01 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter(<LineInteractionType.MACROATOM: 2>) |
| | 7.57±0.01s | 7.75±0.01s | 1.02 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter(<LineInteractionType.SCATTER: 0>) |
| | 3.54±0.04s | 3.52±0.04s | 0.99 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 4.33±0.01s | 4.19±0.02s | 0.97 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 1.40±0.01s | 1.39±0.01s | 1.00 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 6.24±0.01s | 6.30±0s | 1.01 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 4.89±0.01s | 4.90±0.01s | 1.00 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 4.90±0.01s | 4.92±0s | 1.01 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 4.84±0s | 4.92±0.01s | 1.02 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley({'tau_russian': 10.0, 'survival_possibility': 0.0}) |
| | 4.88±0.01s | 5.00±0.02s | 1.02 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley({'tau_russian': 15.0, 'survival_possibility': 0.1}) |
| | 3.58±0.01s | 3.62±0.01s | 1.01 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
If you want to see the graph of the results, you can check it here |
https://github.com/tardis-sn/tardis/actions/runs/10115538957 docs passed at least. |
Benchmarks still aren't quite working on PRs here so we can't check that. |
…estimator_cleanup
…estimator_cleanup
The benchmark is now working after merging in #2747. |
tardis/plasma/properties/continuum_processes/photo_ion_rate_coeff.py
Outdated
Show resolved
Hide resolved
tardis/plasma/properties/continuum_processes/recomb_rate_coeff.py
Outdated
Show resolved
Hide resolved
tardis/opacities/macro_atom/continuum_processes/collisional_ion_trans_prob.py
Show resolved
Hide resolved
3fdce9a
to
7d8e6e0
Compare
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
Write a complete description of your changes, including the necessary context or any piece of information required to understand your work.
Also, link issues affected by this pull request by using the keywords:
close
,closes
,closed
,fix
,fixes
,fixed
,resolve
,resolves
orresolved
.📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label