Repository navigation
Move vpackets to the spectrum solver - #3799
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
*beep* *bop* Hi, human. I'm the @tardis-bot and I noticed that your email is not associated with an ORCID ID in our database. Please add your email and ORCID ID to the If you don't have an ORCID ID yet, you can create one for free at orcid.org. ORCID IDs help ensure you get proper credit for your scientific contributions. The format should be: Runs: ORCID check · comment publisher |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3799 +/- ##
==========================================
+ Coverage 70.51% 70.94% +0.43%
==========================================
Files 207 207
Lines 16064 15845 -219
==========================================
- Hits 11328 11242 -86
+ Misses 4736 4603 -133 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The docs workflow has completed with these results:
View the documentation preview. Runs: build and test · publish |
| numba.typed.List | ||
| Per-packet virtual packet collections. | ||
| """ | ||
| vpacket_collections = TypedList() |
There was a problem hiding this comment.
Can you just make a list of the appropriate size of size no_of_packets? The programmer in me still hates appending to lists where it can be avoided. A quick search came up with this.
https://stackoverflow.com/questions/60186698/create-a-numba-typed-list-without-looping-over-a-python-list
There was a problem hiding this comment.
Made it somewhat more readable with a comprehension.
| self.iterate( | ||
| self.last_no_of_packets, self.no_of_virtual_packets | ||
| self.last_no_of_packets, | ||
| retain_full_trackers=self.no_of_virtual_packets > 0, |
There was a problem hiding this comment.
One more question about this. Would we ever want to retain the full tracker without ever intending a virtual packet spectrum? My intuition says yes for diagnosing packet histories for optically thick stuff, especially with the IIP workflow which force virtual packets off.
So I would think the behavior should be - you request the full packet tracker to persist as the user facing flag, and later on if you try to make a virtual packet spectrum but didn't keep the full tracker, you just raise an error and say you need the full tracker at that point.
There was a problem hiding this comment.
Right now, the behaviour is that if you request the full packet tracker OR more than zero virtual packets, you get a tracker out that can be used for virtual packets. The full packet tracker switch works for all workflows. If you try to make a spectrum without a tracker, yep you get an error solve_virtual_packet_spectrum raises ValueError if it's called without retained trackers.
| self.transport.rpacket_tracker, | ||
| self.no_of_virtual_packets, | ||
| ) | ||
| # Memory: the histories are not needed once the spectrum is solved |
There was a problem hiding this comment.
Mentioned above, but is this true? Maybe you would want to investigate what packets that interact multiple times are doing. That doesn't seem outlandish to me.
There was a problem hiding this comment.
Yeah. In this case, it's a step too far to just empty out the tracker.
…o solve for the spectrum
There was a problem hiding this comment.
Hard to track - is this code moved somewhere else? If it's gone why don't we need it anymore? It's not obviously vpacket specific.
There was a problem hiding this comment.
It's not technically relevant to this PR, but the file is not referenced anywhere.
|
Approved pending regression data checks passing - waiting for the cache to update now |
📝 Description
Type: 🎢
infrastructureMoves the vpacket calculations to the spectrum solver. This reverts some of the memory-safe options because we can no longer free the rpacket trackers if vpackets are requested.
Needs tardis-sn/tardis-regression-data#131
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docslabel