-
Notifications
You must be signed in to change notification settings - Fork 16
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
BUG: handle predicted annotations with no segments, fix #393 #394
BUG: handle predicted annotations with no segments, fix #393 #394
Conversation
See rationale for this fix on that issue: https://github.com/NickleDave/vak/issues/393 and related bug report in https://github.com/NickleDave/vak/issues/386 - change `lbl_tb2segments` to return all `None`s when `lbl_tb` passed in is all 'unlabeled' class - also add logic to `lbl_tb2segment` to handle case where post-processing removes all labeled segments; in that case again return all `None`s - change `vak.core.predict` so it just `continue`s when `lbl_tb2segments` returns all `None`s + i.e. do not create an `Annotation` instance for the vocalization
@avanikop after making these fixes I was able to run I will also add tests for this. It would be great @avanikop @marichard123 if you could check this branch out and test that it works for you, and also behaves as you expect. To do that, you'd need to
For a dev install, you'll want to follow instructions here:
Let me know and I can help if you get stuck on any of that. |
Unit tests passed for me locally so this doesn't seem to have broken anything else. |
I am going to go ahead and merge this and release a new dev version, so ppl can test by installing that |
@all-contributors please add @Luke-Poeppel for doc @Luke-Poeppel I'll be sure to credit you for other contributions when I merge them (like a contributing.md!) -- working on it! |
I've put up a pull request to add @Luke-Poeppel! 🎉 |
whoops @Luke-Poeppel I meant to comment on your PR |
See rationale for this fix on that issue:
https://github.com/NickleDave/vak/issues/393
and related bug report in
https://github.com/NickleDave/vak/issues/386
lbl_tb2segments
to return allNone
swhen
lbl_tb
passed in is all 'unlabeled' classlbl_tb2segment
to handle casewhere post-processing removes all labeled segments;
in that case again return all
None
svak.core.predict
so it justcontinue
swhen
lbl_tb2segments
returns allNone
sAnnotation
instance for the vocalization