tardis-sn / tardis

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

TARDIS Full Formal Integral Regression Tests #2805

Closed atharva-2001 closed 2 months ago

atharva-2001 commented 2 months ago

:pencil: Description

Type: :vertical_traffic_light: testing Test Files- https://github.com/tardis-sn/tardis-regression-data/pull/20

: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 2 months ago

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

```diff 3 F405 `deepcopy` may be undefined, or defined from star imports 1 RET505 Unnecessary `else` after `return` statement 1 F403 `from tardis.tests.fixtures.atom_data import *` used; unable to detect undefined names 1 F821 Undefined name `pytest_report_header` 1 PGH004 Use specific rule codes when using `noqa` ```

Complete output(might be large):

```diff tardis/conftest.py:11:1: F403 `from tardis.tests.fixtures.atom_data import *` used; unable to detect undefined names tardis/conftest.py:29:49: PGH004 Use specific rule codes when using `noqa` tardis/conftest.py:31:9: F821 Undefined name `pytest_report_header` tardis/conftest.py:144:5: RET505 Unnecessary `else` after `return` statement tardis/conftest.py:229:19: F405 `deepcopy` may be undefined, or defined from star imports tardis/conftest.py:238:19: F405 `deepcopy` may be undefined, or defined from star imports tardis/conftest.py:267:19: F405 `deepcopy` may be undefined, or defined from star imports Found 7 errors. ```
codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 69.73%. Comparing base (5fe6806) to head (1a81691). Report is 2 commits behind head on master.

Files Patch % Lines
tardis/spectrum/base.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2805 +/- ## ========================================== - Coverage 69.88% 69.73% -0.15% ========================================== Files 208 208 Lines 15453 15462 +9 ========================================== - Hits 10799 10783 -16 - Misses 4654 4679 +25 ```

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

tardis-bot commented 2 months ago

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

Significantly changed benchmarks:

```diff | Change | Before [5fe6806d] | After [1a816915] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-----------------------------------------------------------------------------------------------| | - | 228±0.1ns | 205±0.01ns | 0.9 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | ```

All benchmarks:

```diff Benchmarks that have improved: | Change | Before [5fe6806d] | After [1a816915] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-----------------------------------------------------------------------------------------------| | - | 228±0.1ns | 205±0.01ns | 0.9 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | Benchmarks that have stayed the same: | Change | Before [5fe6806d] | After [1a816915] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 30.3±0.06μs | 36.4±2μs | ~1.20 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 5.85±0.8μs | 6.70±1μs | ~1.15 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 47.7±30μs | 53.3±30μs | ~1.12 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 3.42±0ms | 3.79±0.02ms | ~1.11 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 35.5±10μs | 23.7±6μs | ~0.67 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 7.22±2μs | 7.76±2μs | 1.07 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 2.33±1μs | 2.43±2μs | 1.04 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 2.53±0.4ms | 2.62±0.5ms | 1.04 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 2.82±0.01ms | 2.89±0ms | 1.03 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 40.4±0.08s | 40.4±0.06s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 2.08±0m | 2.08±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 732±0.6ns | 734±0.8ns | 1.00 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 1.89±0.01ms | 1.86±0.01ms | 0.99 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 3.10±0.4μs | 3.06±0.7μs | 0.99 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 561±100ns | 552±100ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 571±200ns | 561±200ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 1.08±0m | 1.06±0m | 0.98 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 3.46±0.5μs | 3.36±0.6μs | 0.97 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 42.4±20μs | 40.7±20μs | 0.96 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | | | 66.1±0.04ms | 63.6±0.2ms | 0.96 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 1.24±0μs | 1.17±0μs | 0.94 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 541±100ns | 501±100ns | 0.93 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 1.55±0.3μs | 1.41±0.5μs | 0.91 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | ```

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