-
Notifications
You must be signed in to change notification settings - Fork 26
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
Global observations: avoid time/duration #206
Comments
AFAIK every observation in JAMS must have a time and duration, it's baked into the basic observation structure. The convention is that tags (track-level annotations) have a duration that matches the track duration. If you're working with data that lives exclusively in tag space (i.e. not mixing strong labels and tags) so you could, for example, use the |
That's what I thought too, but
|
Sorry, I meant ignore the actual values of time/duration, but you must still set them because it's baked into JAMS observations. So you could either do:
or
And just ignore the time/duration values in the rest of your code. I'd opt for the former just because it means if you ever do need the duration of the observation it's set correctly. |
p.s - another motivation for using |
It still feels a bit cumbersome to having to add these values at the observation level (and have them repeated along the whole raw JSON annotation), when you just want to use the global ones that are already available at the annotation level. Maybe something to consider for the next release? |
I agree it's cumbersome, but time/duration are baked into the definition of an observation: Lines 597 to 599 in 255a5ee
I may be wrong but I believe that supporting observations both with and without time/duration would require a major overhaul that would impact a significant number of lines (apart from the core structure, think validation and every operation currently supported on annotations), if it's even feasible under the current design. Since @bmcfee was the main architect behind the observation tuple, he should probably chime in here. |
Yes, the schema is written such that all observations have a time and duration (non-negative float) to validate properly. I think the correct thing to do here is as @justinsalamon says: make the implicit quantities explicit by documenting the length of the track in the observation fields. Of course, nobody forces you to use that information, but it needs to be there to validate in the schema. |
Sounds good. Thanks for your help! |
Is there any way I could add an observation without the fields
time
andduration
, such that it becomes a track-level observation (e.g., track-level tag)?The text was updated successfully, but these errors were encountered: