-
Notifications
You must be signed in to change notification settings - Fork 670
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
ChainReaders now apply their own transformations #3344
base: develop
Are you sure you want to change the base?
Conversation
Hello @mnmelo! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2021-06-08 09:44:20 UTC |
02a8ab8
to
7d11942
Compare
To prevent over-transformation of I'm exploring the possibility that the ChainReader stores an unmodified Timestep along with the sub-reader. EDIT: Done! At least now only Timesteps are copied for every access, no need to re-parse single-frames. |
Codecov ReportBase: 93.52% // Head: 93.52% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #3344 +/- ##
========================================
Coverage 93.52% 93.52%
========================================
Files 190 190
Lines 25028 25020 -8
Branches 3542 3543 +1
========================================
- Hits 23407 23400 -7
Misses 1100 1100
+ Partials 521 520 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
How does that work with the memory reader? This was the main reason the ChainReader is currently differing the transformations for the sub-readers. |
Good point. Will check. Tests passed, though this may just mean we need more tests for these conditions 😉 |
I dug deeper and, from what I could understand, @jbarnoud, there should be no conflict with the MemoryReader. Here's the several cases that I see may happen when loading a Universe with a ChainReader:
Did you have any specific conflicting use-case in mind that I can double check? Perhaps there may be contrived corner cases where one of a ChainReader's sub-readers is a MemoryReader (is this even possible?). Was this what you were thinking about? |
The case that I expect to break is if you have a memory reader within the chain reader. That could happen if one of the trajectories in the chain is an array of coordinates. Then you have a special case with the chain reader and a special case for the memory reader, question is : how do these special case work with each other? On 7 Jun 2021 02:51, Manuel Nuno Melo ***@***.***> wrote:
I dug deeper and, from what I could understand, @jbarnoud, there should be no conflict with the MemoryReader. Here's the several cases that I see may happen when loading a Universe with a ChainReader:
in_memory requested at Universe creation time and transformations passed: in this case coordinates are first read into memory, and only then transformations added and applied. It will always be the MemoryReader (which has, by then, replaced the ChainReader) that will apply them, and this shouldn't differ from current behavior;transfer_to_memory issued after the Universe is loaded with transformations: in this case timesteps will be transformed by the ChainReader, then read into memory. This seems to also be the current behavior.add_transformations issued after the trajectory is in memory: this is essentially the same order of events as during Universe initialization.
Did you have any specific conflicting use-case in mind that I can double check? Perhaps there may be contrived corner cases where one of a ChainReader's sub-readers is a MemoryReader (is this even possible?). Was this what you were thinking about?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Ok, so maybe not so much a corner case. In that situation we have indeed a problem, in that the ChainReader risks applying the same transform multiple times, cumulatively, on the MemoryReader. I'm trying to make the ChainReader aware of this and somehow keep track of the transformed sub-frames. |
Closes #3343 Takes into account over-transformation of SingleFrameReaders, which never re-create their ts when re-accessed.
bec904f
to
db1d7b8
Compare
The case of ChainReader with MemoryReader sub-readers now works well with transforms at the ChainReader level. |
Overtransformation protection now implemented by book-keeping already-transformed frames (for MemoryReaders and for SingleFrame readers). ChainReader now plays well with MemoryReader sub-readers. (Fixes #3349)
db1d7b8
to
7e6f3d7
Compare
The tests are passing, but there are some problems connecting to Codecov from GH Actions CI (a consequence of the fastly crash?). I keep re-running the GH Actions CI tests but there's always one or two that can't complete that post-test step. Would a rerun of all CI help? (how can I even trigger it?) |
@mnmelo I didn't get to see what happened. Maybe let's see what happens when this current round finishes running? There's a few options to re-run all the CI (the easiest is just to close and re-open the PR), but it's not necessary at the moment. |
Seemed to have worked this time. We can ignore the codecov project report (since it's just affected by the reduced number of lines). |
Given the slew of ChainReader-related issues, I'd like to breath some new life into this PR... |
Closes #3343
Takes into account over-transformation of
SingleFrameReaders
, whichnever re-create their
ts
when re-accessed.PR Checklist