Make spacy models and extra package download compatible with PEP 503 #11244
Replies: 2 comments
-
As |
Beta Was this translation helpful? Give feedback.
-
To clarify, the model packages are valid pip packages and they are compatible with pip, poetry, etc.: pip install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.4.0/en_core_web_sm-3.4.0-py3-none-any.whl As part of
Or more securely including the checksum:
And the docs include a related example with the The checksums are included at the top of the release notes, e.g.: https://github.com/explosion/spacy-models/releases/tag/en_core_web_sm-3.4.0 You can follow the "Release details" button on any model entry in https://spacy.io/models/ to get to the release notes, which include the I think there are two separate issues:
In terms of the second issue, this install command would be fine, where you'd end up with the most recent version of the model and a compatible version of spacy:
Or a specific model version, which would currently end up with
However, someone who runs:
... is not going to end up with the version of spacy that they intended. They'll currently get Someone who runs:
... is going to end up downloading the models for v3.4.0, v3.3.0, v3.2.0, and v3.1.0 before pip finds a version compatible with the spacy version. This is over 2GB of unnecessary downloads, and just gets worse over time. I'm not sure that there's a good solution given the limitations of pip, but suggestions are welcome. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the models package should be installed via
python -m spacy download <model_package>
, It cannot be directly installed viapip install
.Why not provide a single plain html page under the domain
spacy.io
which provide the links compatible with PEP503.As a reference, pytorch-cuda is a example of this see pytorch cuda116.
The desired models installation method should be like
pip install --extra-index-url <xxx>.spacy.io/<vvv>/models/
or other similar format.It would be easy to make the package manager like pip, poetry or other high level package manager based on pip more operable.
Beta Was this translation helpful? Give feedback.
All reactions