-
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: predict empty file handling #634
Comments
Sorry you had this issue @nhoglen and thank you for this very thorough bug report. I'll know for sure when I test with the data but my hunch is you have correctly identified the issue; we do not correctly handle the case where there are no predicted segments because we don't look for the empty list This was supposed to be fixed by #394 but clearly it wasn't! Could you please share the data some other way? I wasn't able to open the sharepoint link. Will ask by email too but wanted to reply here (and thank you profusely for making this easy for me to fix 😼 😁 ) edit: Box link you sent worked, nvm! second edit: just to cross-link, this was originally posted on the forum: https://forum.vocalpy.org/t/error-in-last-step-of-generating-predictions/54 |
🤔 I'm not able to replicate this bug -- Could you please reply with the following files attached?
I'm attaching the .toml file I used as well as the csv of annotations that was produced, in a .tar fwiw I have the same versions of vak, tweetynet, and crowsetta installed. I can try making an env on Windows with conda files just in case for some reason the platform is the source of the issue. Thank you! 🙏 |
Oops, sorry I missed this -- I'm not used to looking out for things on GitHub. I have found that getting the environment set up right on Windows takes some finagling, so I would not be surprised if there are weird version issues baked in there. The attached zip has the listed files. environment-etc.zip I'm happy to keep poking at this and will keep a closer eye on GitHub/figure out how to get it to send more notifications. |
Thank you @nhoglen! That helped. I now also get the same exception that you first reported on the forum:
It does look like this is in fact a bug I introduced when I added a new feature here:
whereas the same condition would have caused the previous version of this function would have returned all None s:vak/src/vak/labeled_timebins.py Line 441 in 25a0c8a
Not sure if changing it back will break any other changes I made--will find out when I test--but my plan is to change it back for now and release a bugfix version. |
BUG: Have `to_segments` return all Nones for no segments, fix #634
Describe the bug
predict breaks when converting segments to crowsetta seq if no segments were found in the file.
To Reproduce
vak prep check_this_recording.toml
runs fine.vak predict check_this_recording.toml
runs untilvak.core.predict - INFO - converting predictions to annotations
then throws this error:I did a little bit of digging and determined that audio segments without any calls are tripping up the crowsetta conversion process. Specifically, at line 239 of the vak predict.py file, there is a check for empty segments that is going awry because labels is turning up an empty list rather than a
None
object.Inspecting the variables at this step shows that
onset_s
andoffset_s
areNone
as expected, but notlabels
.Expected behavior
In my previous vak install (version 0.4.0, I think), this ran to completion and generated a full set of predictions.
Desktop (please complete the following information):
Additional context
I will email the files to reproduce; the zip is too big to upload here.
The text was updated successfully, but these errors were encountered: