tardis-sn / tardis

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

Replace `setup_lfs` action with single file checkout #2861

Closed atharva-2001 closed 1 month ago

atharva-2001 commented 1 month ago

:pencil: Description

Type: :beetle: bugfix | :rocket: feature | :biohazard: breaking change | :vertical_traffic_light: testing | :memo: documentation | :roller_coaster: infrastructure

The setup_lfs action uses the entire regression data repo, even though it is cached. Downloading the atom data file might consume fewer resources and prevent the LFS bandwidth from being used too much.

: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 1 month ago

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

```diff 7 W291 [*] Trailing whitespace 2 E999 [ ] SyntaxError: Expected an expression 2 W293 [*] Blank line contains whitespace ```

Complete output(might be large):

```diff .github/workflows/benchmarks.yml:3:4: E999 SyntaxError: Expected an expression .github/workflows/benchmarks.yml:20:5: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:86:49: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:116:81: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:117:54: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:204:1: W293 [*] Blank line contains whitespace .github/workflows/benchmarks.yml:223:22: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:224:170: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:226:84: W291 [*] Trailing whitespace .github/workflows/benchmarks.yml:243:1: W293 [*] Blank line contains whitespace .github/workflows/build-docs.yml:7:4: E999 SyntaxError: Expected an expression Found 11 errors. [*] 9 fixable with the `--fix` option. ```
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.70%. Comparing base (81ec6e8) to head (f251c2f). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2861 +/- ## ========================================== - Coverage 71.08% 70.70% -0.38% ========================================== Files 213 213 Lines 15823 15823 ========================================== - Hits 11248 11188 -60 - Misses 4575 4635 +60 ```

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

andrewfullard commented 1 month ago

This is definitely the only regression data file required for these actions?

tardis-bot commented 1 month ago

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

Significantly changed benchmarks:

```diff ```

All benchmarks:

```diff Benchmarks that have stayed the same: | Change | Before [81ec6e8e] | After [f251c2f9] | Ratio | Benchmark (Parameter) | |----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------| | | 2.98±0.5μs | 3.50±0.4μs | ~1.17 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket | | | 7.75±2μs | 6.98±2μs | ~0.90 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley | | | 3.80±0.4μs | 3.43±0.2μs | ~0.90 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell | | | 2.18±1μs | 1.90±0.3μs | ~0.88 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line | | | 26.7±8μs | 23.3±6μs | ~0.87 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list | | | 7.05±0.6μs | 6.12±1μs | ~0.87 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket | | | 44.1±30μs | 47.9±20μs | 1.09 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter | | | 2.14±1μs | 2.22±1μs | 1.04 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators | | | 31.5±0.06μs | 32.4±0.02μs | 1.03 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list | | | 718±0.8ns | 730±1ns | 1.02 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter | | | 1.71±0.02ms | 1.73±0.01ms | 1.01 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop | | | 581±80ns | 582±200ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation | | | 37.4±0.03s | 37.5±0.08s | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis | | | 1.04±0m | 1.04±0m | 1.00 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking | | | 2.09±0m | 2.08±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions | | | 204±0.7ns | 205±0.08ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body | | | 561±100ns | 551±100ns | 0.98 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation | | | 3.90±0.06ms | 3.83±0.01ms | 0.98 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') | | | 66.3±0.3ms | 65.0±0.02ms | 0.98 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe | | | 611±200ns | 591±100ns | 0.97 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation | | | 2.66±0.4ms | 2.57±0.5ms | 0.97 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop | | | 1.24±0μs | 1.20±0μs | 0.96 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary | | | 2.79±0.02ms | 2.66±0ms | 0.95 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') | | | 47.3±30μs | 43.3±20μs | 0.92 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission | ```

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

atharva-2001 commented 1 month ago

This is definitely the only regression data file required for these actions?

Yes I think so. I tested these changes in these workflows- https://github.com/atharva-2001/tardis/actions/runs/11404461289/job/31733676574 https://github.com/atharva-2001/tardis/actions/runs/11404461295/job/31733676858