-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in 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 [0fc2c763] <master> | After [413edbe5] | Ratio | Benchmark (Parameter) |
|----------|------------------------------|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------|
| | 22.2±6μs | 26.3±6μs | ~1.19 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_last_interaction_tracker_list |
| | 42.8±20μs | 49.3±30μs | ~1.15 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_line_scatter |
| | 1.48±0.4μs | 1.67±0.4μs | ~1.13 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_line |
| | 1.96±1μs | 2.18±1μs | ~1.11 | transport_montecarlo_estimators_radfield_estimator_calcs.BenchmarkMontecarloMontecarloNumbaPacket.time_update_line_estimators |
| | 3.15±0.5μs | 3.48±0.4μs | ~1.10 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_within_shell |
| | 3.04±0.4μs | 2.74±0.3μs | ~0.90 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_bad_vpacket |
| | 581±100ns | 491±100ns | ~0.85 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_compton_opacity_calculation |
| | 2.59±0.01ms | 2.83±0.05ms | 1.09 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('scatter') |
| | 7.56±2μs | 8.02±2μs | 1.06 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket_volley |
| | 209±0.4ns | 219±0.05ns | 1.05 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_intensity_black_body |
| | 2.44±0.4ms | 2.56±0.4ms | 1.05 | transport_montecarlo_single_packet_loop.BenchmarkTransportMontecarloSinglePacketLoop.time_single_packet_loop |
| | 1.20±0μs | 1.22±0μs | 1.02 | transport_geometry_calculate_distances.BenchmarkTransportGeometryCalculateDistances.time_calculate_distance_boundary |
| | 727±0.2ns | 742±1ns | 1.02 | transport_montecarlo_interaction.BenchmarkTransportMontecarloInteraction.time_thomson_scatter |
| | 38.1±0.05s | 38.3±0.1s | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis |
| | 1.04±0m | 1.05±0m | 1.01 | run_tardis.BenchmarkRunTardis.time_run_tardis_rpacket_tracking |
| | 1.65±0ms | 1.66±0ms | 1.01 | transport_montecarlo_main_loop.BenchmarkTransportMontecarloMontecarloMainLoop.time_montecarlo_main_loop |
| | 6.20±1μs | 6.29±1μs | 1.01 | transport_montecarlo_vpacket.BenchmarkMontecarloMontecarloNumbaVpacket.time_trace_vpacket |
| | 591±100ns | 591±100ns | 1.00 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_pair_creation_opacity_calculation |
| | 2.08±0m | 2.08±0m | 1.00 | spectrum_formal_integral.BenchmarkTransportMontecarloFormalIntegral.time_FormalIntegrator_functions |
| | 38.7±0.03μs | 38.9±0.05μs | 1.00 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_generate_rpacket_tracker_list |
| | 63.3±0.05ms | 63.1±0.06ms | 1.00 | transport_montecarlo_packet_trackers.BenchmarkTransportMontecarloPacketTrackers.time_rpacket_trackers_to_dataframe |
| | 3.82±0ms | 3.60±0.01ms | 0.94 | opacities_opacity_state.BenchmarkOpacitiesOpacityState.time_opacity_state_initialize('macroatom') |
| | 641±100ns | 591±200ns | 0.92 | opacities_opacity.BenchmarkMontecarloMontecarloNumbaOpacities.time_photoabsorption_opacity_calculation |
| | 48.2±20μs | 44.4±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 |
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 |
📝 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