ImportError: cannot import name 'handle_scores_per_type' from 'spacy.cli.evaluate'

I'm having this issue when trying to run prodigy pos.correct with spaCy v3 model inside a Docker container.
I tried with prodigy v1.11.0 and v1.11.4 and with a ner.manual recipe as well, nothing changes.

I'm installing via pip install wheel_file, which automatically installs the latest spaCy version (3.1.2). I checked that the method was introduced in that exact release, so Prodigy should've been able to import it.

I'm currently stuck on this. Thanks in advance!

Hi! This sounds like you ended up with a Python environment mismatch where the environment you're executing doesn't actually have the packages you think it has. When you execute Prodigy, try running it with python -m prodigy and double-check that which python here refers to the Python installation and environment you're expecting and that you've installed the latest Prodigy and spaCy into.

Hi! First of all, thanks for all your excellent work! You are all incredible.

And I managed to solve the problem: the spacy model's meta.json had spacy >=3.0.0,<3.1.0 requirements, so it would downgrade the module version. And it was installed silently in the ENTRYPOINT command in the Dockerfile.
Anyway the solution was updating the meta.json to <3.2.0. Thanks again!