tardis-sn / tardis

TARDIS - Temperature And Radiative Diffusion In Supernovae
https://tardis-sn.github.io/tardis
204 stars 406 forks source link

Simulation Regression Tests #2804

Closed atharva-2001 closed 3 months ago

atharva-2001 commented 3 months ago

:pencil: Description

Type: :beetle: bugfix | :vertical_traffic_light: testing

Files are saved here- https://github.com/tardis-sn/tardis-regression-data/pull/18

:pushpin: Resources

Examples, notebooks, and links to useful references.

:vertical_traffic_light: Testing

How did you test these changes?

:ballot_box_with_check: Checklist

Note: If you are not allowed to perform any of these actions, ping (@) a contributor.

tardis-bot commented 3 months ago

*beep* *bop* Hi human, I ran ruff on the latest commit (8008e2a192a85d7197660825598f6c22f3cc02a3). Here are the outputs produced. Results can also be downloaded as artifacts here. Summarised output:

```diff ```

Complete output(might be large):

```diff All checks passed! ```
tardis-bot commented 3 months ago

*beep* *bop* Hi human, I ran benchmarks as you asked comparing master (a054d743a0b35fd153e407a2f5df973b103bd32e) and the latest commit (8008e2a192a85d7197660825598f6c22f3cc02a3). Here are the logs produced by ASV. Results can also be downloaded as artifacts here.

Significantly changed benchmarks:

```diff | Change | Before [a054d743] | After [8008e2a1] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|---------------------------------------------------------------------------------------------------------| | + | 1.67±0ms | 1.88±0.01ms | 1.13 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | ```

All benchmarks:

```diff Benchmarks that have stayed the same: | Change | Before [a054d743] | After [8008e2a1] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 24.1±6μs | 30.9±9μs | ~1.28 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 1.32±0.3μs | 1.47±0.3μs | ~1.11 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 551±200ns | 601±100ns | 1.09 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 6.22±1μs | 6.64±0.4μs | 1.07 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 2.89±0.8μs | 3.10±0.5μs | 1.07 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 2.45±0.4ms | 2.58±0.4ms | 1.06 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 2.91±0.5μs | 3.06±0.4μs | 1.06 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 591±100ns | 621±200ns | 1.05 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 63.2±0.07ms | 66.1±0.3ms | 1.05 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 521±200ns | 531±100ns | 1.02 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 39.8±0.02s | 40.2±0.1s | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 1.19±0μs | 1.21±0μs | 1.01 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 48.6±20μs | 48.9±30μs | 1.01 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 1.07±0.01m | 1.06±0m | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 2.06±0m | 2.07±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 2.80±0.01ms | 2.78±0.01ms | 0.99 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 7.38±2μs | 7.33±2μs | 0.99 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 3.63±0.02ms | 3.55±0ms | 0.98 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 208±0.1ns | 203±0.2ns | 0.98 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 31.8±0.05μs | 30.9±0.02μs | 0.97 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 772±0.9ns | 726±1ns | 0.94 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 2.17±1μs | 2.02±2μs | 0.93 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 50.7±20μs | 47.4±20μs | 0.93 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | Benchmarks that have got worse: | Change | Before [a054d743] | After [8008e2a1] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|---------------------------------------------------------------------------------------------------------| | + | 1.67±0ms | 1.88±0.01ms | 1.13 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | ```

If you want to see the graph of the results, you can check it here

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.37%. Comparing base (a054d74) to head (8008e2a). Report is 4 commits behind head on master.

Files Patch % Lines
tardis/simulation/tests/test_simulation.py 96.42% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2804 +/- ## ========================================== - Coverage 69.60% 69.37% -0.24% ========================================== Files 206 206 Lines 15518 15486 -32 ========================================== - Hits 10802 10744 -58 - Misses 4716 4742 +26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.