Comments (4)
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
from vak.
π€ I'm not able to replicate this bug -- vak predict
runs fine for me on Linux using the files you provided.
Could you please reply with the following files attached?
- the .toml configuration file you're using
- the output of running the following command in your conda environment:
conda env export > environment.yml
- as well as
conda list --explicit > spec-file.txt
(also in the conda environment you are using when you get this bug)
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! π
from vak.
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.
from vak.
Thank you @nhoglen! That helped.
It was an option in the TOML config file that I was missing, the min_segment_dur
.
Once I added that to the config I had, I was able to replicate your error.
I now also get the same exception that you first reported on the forum:
Traceback (most recent call last):
File "/home/pimienta/miniconda3/envs/vak8-env/bin/vak", line 10, in <module>
sys.exit(main())
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/vak/__main__.py", line 48, in main
cli.cli(command=args.command, config_file=args.configfile)
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/vak/cli/cli.py", line 49, in cli
COMMAND_FUNCTION_MAP[command](toml_path=config_file)
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/vak/cli/cli.py", line 18, in predict
predict(toml_path=toml_path)
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/vak/cli/predict.py", line 50, in predict
core.predict(
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/vak/core/predict.py", line 243, in predict
seq = crowsetta.Sequence.from_keyword(
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/crowsetta/sequence.py", line 382, in from_keyword
labels) = cls._validate_onsets_offsets_labels(onsets_s,
File "/home/pimienta/miniconda3/envs/vak8-env/lib/python3.8/site-packages/crowsetta/sequence.py", line 224, in _validate_onsets_offsets_labels
raise ValueError('must provide either onset_inds and offset_inds, or '
ValueError: must provide either onset_inds and offset_inds, or onsets_s and offsets_s
(vak8-env) β pimienta@pop-os ξ° ~/Documents/data/vocal/bug-reportξ°
It does look like this is in fact a bug I introduced when I added a new feature here:
8c6aee1
where for some reason that's not clear to me now I changed this function to return an empty string when there were no predicted segments after post-processing (e.g. with a min. segment dur):
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.
from vak.
Related Issues (20)
- Inconsistent syllable error rate between vak eval and predict HOT 15
- BUG: `Cannot convert a MPS Tensor to float64 dtype` on Apple M1 Max HOT 3
- BUG/MAINT: Have all metrics return tensors HOT 1
- DOC: Make minor doc fixes
- ENH: Require that `metrics` for a model definition be a subclass of `torchmetrics.Metric` HOT 3
- BUG: Getting a warning about Nvidia Tensor Cores HOT 1
- BUG: Getting a warning about missing logger directories HOT 2
- ENH: Have `vak.predict` accept `post_tfm_kwargs` like `eval` + `learncurve`
- ENH: Minimize duplication of data when preparing datasets for frame classification models HOT 1
- BUG: Fix model families to log train loss on step
- ENH: Rename `SegmentErrorRate` -> `CharacterErrorRate`
- ENH: Rename `datasets` to `pipes`, that have built-in transforms HOT 1
- BUG: predict raises KeyError when config file is missing `[PREDICT.transform_kwargs]` with `window_size` option HOT 5
- BUG: Loss and metrics are not logged correctly HOT 1
- ENH: Have all model families save "best" checkpoint with the same name
- CLN: Move `vak.common.trainer` into `frame_classification` / have per-model family trainers
- ENH: Add post-processing transform to remove short silent gaps
- ENH: check that value for validation step is valid for frame classification models before running learning curve
- Error for duplicate value val_dur in gy6ro6_train.toml from tutorial HOT 3
- chore: release checklist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vak.