-
Notifications
You must be signed in to change notification settings - Fork 6
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
windowing
generator now yields AxisArray.
#103
Conversation
Oops. I did't meant to base on |
d0057dd
to
d1535d2
Compare
@griffinmilsap , last time I changed windowing it broke one of your pipelines. Can you please check this one? |
baac7a7
to
29a074d
Compare
The idea of 0-length dimensions in @pperanich do we rely on As always, @cboulay thank you for the contributions; these are incredibly valuable and I apologize it took so long to get to this one. |
29a074d
to
cc93158
Compare
(rebased) @griffinmilsap , I chose "win" because I thought that's what you were using but I thought it was scoped to exactly using a windowing node. I didn't think about what would happen if you applied the Window unit to an AxisArray that already had a "win" axis. That is, if you tell the Window Unit that you don't want a newaxis and the generator inserts the "win" axis anyway for its own internal bookkeeping, it will be confused by the existing "win" axis. Sorry about that. Reminder to myself: Modify my offline pipelines to be explicit about the |
I accidentally had an unrelated commit sneak into this PR. It's similar in that it uses size-0 arrays in offline pipelines, but it's for a different processing step. I'll try to separate them. Edit: It's been removed and now exists in another commit (soon PR). |
cc93158
to
0876d17
Compare
I think its time to merge this and if I run into issues on dev, I've got time to react to them :) |
Fixes #100
The
windowing
generator now always yields anAxisArray
.Previously, the return type was
List[AxisArray]
. Depending on the configuration, the list might have always been length 1 (in 1:1 mode) or usually 1, unless a big chunk came in and multiple windows were available.Now, there is always a
newaxis
added ("win" by default) and that will usually have length 1, but sometimes more.The "win" axis might also have length 0 when the most recent
send
was inadequate to fill the next window. Previously, an unfilled.send
would yieldNone
(previous yield type incorrectly failed to includeOptional[...]
). This is probably the biggest change here and might merit some discussion:What should generators yield when the
.send
does not provide enough data to yield a result?None
, an emptyAxisArray
, or anAxisArray
with most details correct except one dimension is0
andmsg.data.size==0
?The Unit still has the option for the setting
newaxis=None
, in which case the value yielded by the generator is iterated over the "win" axis. In cases where the "win" axis is length 0, nothing is iterated (i.e., nothing published).I had to make a change to the generator-level tests to drop yielded msgs with size 0, whereas previously I was dropping yielded msgs that were None.
The system-level tests are unchanged and continue to pass. If you have a use case that doesn't work with this PR then please create a test for that and I will try to figure out a solution.