"ValueError: max() arg is an empty sequence" in review interface

Hello, I tried the new review interface which looks super cool! btw, and with some datasets (not all) I’m getting this error:

line 42, in make_eg
default_version = max(versions, key=lambda v: len(v[“sessions”]))
ValueError: max() arg is an empty sequence

Thanks for the report! Looks like the recipe currently doesn’t handle all cases correctly where we have an examples but no versions to review (e.g. if you’re using the manual NER interface and there’s only rejected annotations for an example and no accepted ones). I’ve already fixed this and it’ll be included in the next release.

In the meantime, could you try changing line 64 in recipes/review.py like this?

            if versions:

You can find the location of your Prodigy installation like this:

python -c "import prodigy; print(prodigy.__file__)"
1 Like

Thanks! It works, for some reason It was on line 67 on my review.py, before adding the examples checks if versions exits.

1 Like

Just released v1.8.2, which fixes this issue!