tardis-sn / tardis

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

Benchmarks: outdated functions #2634

Open airvzxf opened 3 months ago

airvzxf commented 3 months ago

Describe the bug

Some benchmarks are not executing successfully. In the last refactors, some functions changed the arguments. They didn't update in benchmarks for this reason some benchmarks are not running.


Function opacity_state_initialize missing 2 required positional arguments.

[65.91%] ··· ...port_montecarlo_numba_interface.BenchmarkMontecarloMontecarloNumbaNumbaInterface.time_opacity_state_initialize             failed 
[65.91%] ··· ============== ========                                                                                                              
              Input params                                                                                                                        
             -------------- --------                                                                                                              
                scatter      failed                                                                                                               
               macroatom     failed                                                                                                               
               downbranch    failed                                                                                                               
             ============== ========                                                                                                              
File "/app/code/benchmarks/transport_montecarlo_numba_interface.py", line 21, in time_opacity_state_initialize
 numba_interface.opacity_state_initialize(plasma, line_interaction_type)
TypeError: opacity_state_initialize() missing 2 required positional arguments: 'disable_line_scattering' and 'continuum_processes_enabled'

Function get_doppler_factor expected 4 values rather than 3 arguments.

[79.55%] ··· transport_montecarlo_packet.BenchmarkMontecarloMontecarloNumbaPacket.time_calculate_distance_line                             failed 
[79.55%] ··· ================================================================================================================================== ==
======                                                                                                                                            
                                                                         Parameters                                                               

             ---------------------------------------------------------------------------------------------------------------------------------- --
------
                                            {'packet': {'nu_line': 0.1, 'is_last_line': True}, 'expected': None}                                 f
ailed 
                                           {'packet': {'nu_line': 0.2, 'is_last_line': False}, 'expected': None}                                 f
ailed 
              {'packet': {'nu_line': 0.5, 'is_last_line': False}, 'expected': <class 'tardis.transport.montecarlo.utils.MonteCarloException'>}   f
ailed 
              {'packet': {'nu_line': 0.6, 'is_last_line': False}, 'expected': <class 'tardis.transport.montecarlo.utils.MonteCarloException'>}   f
ailed 
             ================================================================================================================================== ==
======
For parameters: {'packet': {'nu_line': 0.1, 'is_last_line': True}, 'expected': None}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 109, in time_calculate_distance_line
 doppler_factor = frame_transformations.get_doppler_factor(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not enough arguments: expected 4, got 3

For parameters: {'packet': {'nu_line': 0.2, 'is_last_line': False}, 'expected': None}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 109, in time_calculate_distance_line
    doppler_factor = frame_transformations.get_doppler_factor(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not enough arguments: expected 4, got 3

For parameters: {'packet': {'nu_line': 0.5, 'is_last_line': False}, 'expected': <class 'tardis.transport.montecarlo.utils.MonteCarloException'>}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 109, in time_calculate_distance_line
    doppler_factor = frame_transformations.get_doppler_factor(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not enough arguments: expected 4, got 3

For parameters: {'packet': {'nu_line': 0.6, 'is_last_line': False}, 'expected': <class 'tardis.transport.montecarlo.utils.MonteCarloException'>}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 109, in time_calculate_distance_line
    doppler_factor = frame_transformations.get_doppler_factor(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not enough arguments: expected 4, got 3

Function update_line_estimators expected 6 values rather than 6 arguments.

[90.91%] ··· transport_montecarlo_packet.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators                              failed
[90.91%] ··· ===================================================================================== ========
                                                   Parameters                                               
             ------------------------------------------------------------------------------------- --------
              {'cur_line_id': 0, 'distance_trace': 1000000000000.0, 'time_explosion': 52000000.0}   failed 
                     {'cur_line_id': 0, 'distance_trace': 0, 'time_explosion': 52000000.0}          failed 
                {'cur_line_id': 1, 'distance_trace': 100000.0, 'time_explosion': 10000000000.0}     failed 
             ===================================================================================== ========
For parameters: {'cur_line_id': 0, 'distance_trace': 1000000000000.0, 'time_explosion': 52000000.0}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 204, in time_update_line_estimators
    update_line_estimators(
TypeError: not enough arguments: expected 6, got 5

For parameters: {'cur_line_id': 0, 'distance_trace': 0, 'time_explosion': 52000000.0}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 204, in time_update_line_estimators
    update_line_estimators(
TypeError: not enough arguments: expected 6, got 5

For parameters: {'cur_line_id': 1, 'distance_trace': 100000.0, 'time_explosion': 10000000000.0}
Traceback (most recent call last):
…
  File "/app/code/benchmarks/transport_montecarlo_packet.py", line 204, in time_update_line_estimators
    update_line_estimators(
TypeError: not enough arguments: expected 6, got 5

To Reproduce

Execute the benchmarks with the last commit (2ad522819d80ab89ccd8766a4298fa3f24f74ed2): asv run.

Screenshots

System

Additional context