-
-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[TODO] Resolves the chained assignment in level_populations.py #2933
base: master
Are you sure you want to change the base?
Conversation
*beep* *bop* 1 W293 [*] Blank line contains whitespace
Complete output(might be large): tardis/plasma/equilibrium/level_populations.py:65:1: W293 [*] Blank line contains whitespace
Found 1 error.
[*] 1 fixable with the `--fix` option.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2933 +/- ##
==========================================
- Coverage 70.39% 70.04% -0.35%
==========================================
Files 222 222
Lines 16157 16159 +2
==========================================
- Hits 11373 11318 -55
- Misses 4784 4841 +57 ☔ View full report in Codecov by Sentry. |
*beep* *bop* Significantly changed benchmarks: All benchmarks: Benchmarks that have stayed the same:
| Change | Before [5e2d0bb3] <master> | After [78b3c495] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 501±200ns | 591±100ns | ~1.18 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 521±200ns | 581±200ns | ~1.12 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 1.61±0.3μs | 1.44±0.3μs | ~0.89 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 3.63±0.2μs | 3.23±0.6μs | ~0.89 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 5.25±0.07ms | 4.06±0.06ms | ~0.77 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 62.0±40μs | 47.8±30μs | ~0.77 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 2.91±2μs | 2.10±1μs | ~0.72 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 1.71±0ms | 1.81±0.05ms | 1.06 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 6.64±1μs | 7.02±0.9μs | 1.06 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 2.95±0.07ms | 3.03±0.02ms | 1.03 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 29.2±9μs | 29.9±9μs | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 65.8±0.1ms | 67.3±0.1ms | 1.02 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 2.09±0m | 2.11±0m | 1.01 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 205±0.04ns | 205±0.03ns | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 39.3±0.03s | 39.0±0.02s | 0.99 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 1.06±0m | 1.05±0m | 0.99 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 1.19±0μs | 1.19±0μs | 0.99 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 737±1ns | 724±0.8ns | 0.98 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 3.15±0.5ms | 3.04±0.5ms | 0.97 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 47.9±30μs | 45.7±30μs | 0.95 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_emission |
| | 39.9±0.06μs | 37.9±0.05μs | 0.95 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 7.91±2μs | 7.52±2μs | 0.95 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 642±100ns | 601±200ns | 0.94 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 3.24±0.9μs | 3.04±0.5μs | 0.94 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
If you want to see the graph of the results, you can check it here |
Hi @atharva-2001 @andrewfullard @jvshields , |
How have you tested this? |
I was a bit confused whether what example test data can I use(if you can guide a bit on this) to test this, so couldnt test this yet, but logically and generally to avoid chained assignment |
Since you don't understand how it can be tested, I don't think it is currently a reasonable change to make. I should also note that this part of the code is currently in active development. |
📝 Description
Type: 🪲
bugfix
| 🚀feature
| ☣️breaking change
| 🚦testing
| 📝documentation
| 🎢infrastructure
TODO: resolved the chained assignment in
level_populationos.py
by using .loc[] for direct assignment and avoiding chained indexing.📌 Resources
Examples, notebooks, and links to useful references.
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label