-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add is_filtered
to annotations in binary.json
#3245
Conversation
Nice!! I read the discussion and didn't think to acutally check if it was propagated 🤦♂️. Getting outside of the scope of this PR, is it worth adding a test to ensure all parameters are propagated going forward? This is similar to #2515, I wonder if worth reviewing all exporters and setting up some tests to ensure everything required is always propagated. If a config is not propagated between save / load rounds, depending on the config, I guess there is the propensity for some very nasty bugs, in this case we are lucky it was just |
Yeah, some sort of test would probably be a good idea. I guess there is a difference between user annotations vs fundamental annotations, but if you have something in mind I think it would be a useful PR. |
Yes that makes sense, I got confused between
|
This might actually be a problem with the generator. If I run >>> recording = generate_recording(100)
>>> recording.is_filtered()
True |
Interesting! I guess that makes sense for |
Just a quick update, it seems the ATM I can't figure out how to replicate the annotations not being propagated, when I try sorting on a test dataset I see the |
I think you digging into this is super important. I too didn't realize that we had |
): | ||
# This assigns num_channels if num_channels is not None, otherwise num_chan is assigned | ||
num_channels = num_channels or num_chan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zm711 unfortunately, I think we need to keep this. This is not only a deprecation for a current version, but it allows to load recordings that were saved with old versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le'ts get rid of the deprecation comment then and switch it to "needed for backward compatiblity"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good!
is_filtered
to annotationsis_filtered
to annotations
Hey @samuelgarcia @alejoe91, do you think the writing of the |
I think we need the |
Ah yes sorry I had to look into this a bit more, I was looking for However, I think it's internal use there is not necessary and can be removed, and In the below code,
This writes the binary, creates a
So, I think that the intermediate step of writing to
This would be the main thing as it would remove from public view the Additionally, some refactorings to |
BTW @zm711 maybe this discussion is getting a bit out of scope, for sure your fix will help propagate |
yeah that's possible. We can merge this just to get the propagation. Let me add the comment about not removing num_chans and then this is technically ready. |
is_filtered
to annotationsis_filtered
to annotations in binary.json
Okay @JoeZiminski and @alejoe91, this is ready to be merged. Like Joe said maybe we can have a deeper discussion about how different properties and metadata are propagated in the library (since multiple jsons are used). So this can be merged to make sure binary.json has the annotation moving forward. Then we could think about better ways to deal with this library wide. |
Fixes #3244
When we save as binary it seems like we are not saving the
is_filtered
param. This fixes that. The issue linked however, is for the waveform extractor where this mattered more.