-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
ValueError: cymem.cymem.Pool has the wrong size, try recompiling. #2852
Comments
Hi, Apologies for this, but it's a consequence of pip's compromises between efficiency and fidelity in version resolution. Pip processes dependencies in order, and doesn't backtrack if it comes to a dependency conflict. We'll be releasing a version 1.6.0 of Prodigy tomorrow, which will resolve the version conflict. While we understood that this update could cause problems, it was necessary to support Python 3.7, and also to upload binary wheels for spaCy and its dependent packages. |
Thanks for the clarification. Will you be emailing upgrade instructions for 1.6.0 to current license holders? |
@agentofreality Yes, you'll receive an email today. |
In the meantime, you should be able to just downgrade spaCy to |
Hi @ines. I am trying to install spaCy offline having all its dependencies (installed using wheel files). However, I am facing the same issue as this. Python version: |
@lemoncalamitous If you want to install spaCy v2.0.12, you'll also need the old version of cymem, e.g. the latest on the 1.x branch, |
Hi, I've just installed spaCy, and additionally installed it with [CUDA10] support (I'm not using Prodigy - unless this is included in spaCy). I received the same memory size errors during model installation, and now when trying to import spacy. As non hard core Python expert, I'm confused about: A. does spaCy support CUDA 10 as the website implies? B. is this unrelated to CUDA, if so which version of spaCy will work with the models on your website? C. If I need a specific set of spaCy/models, how do I install this? I'm using Python 3.7 |
@folterj Unfortunately the website is in error at the moment. I hadn't realised that our dependency cupy doesn't support CUDA 10 yet, so spaCy only supports up to CUDA 9.2 |
@honnibal Thank you for the quick response. I've reinstalled CUDA, version 9.2, however "pip install -U spacy[cuda92]" gives an error as Cupy does not support 9.2 (only older versions). So compiling cupy - with Visual Studio 2017 build tools using "pip install cupy". Once this successfully ran, reinstalling spaCy ("pip install spacy[cuda]" this time) unfortunately results in the exact same cymem errors. |
Can you just delete your virtualenv and start again? Unfortunately pip doesn't always do smart things once in arbitrary states.
You should see spaCy v2.0.16, cymem 2.0.2, preshed 1.0.1, cupy, thinc 6.12, and thinc_gpu_ops (among others) |
Thank you - I have not created/specified a environment - not sure how to delete environment. When trying to run the first instruction, I get the below error message. The list command shows I already have most of the libraries (including cupy 5.0.0), minus the thinc_gpu_ops. In case relevant, I'm using WinPython and have first installed spaCy without cuda option. Could not find a version that satisfies the requirement cupy-cuda92>=4.0; extra == "cuda92" (from spacy[cuda92]) (from versions: ) |
Installing into the main Python installation is sort of unideal, because it means you'll carry the state around between projects. It's also hard to back out of version problems. You should be able to run something like |
@honnibal Thank you again - I understand it can be useful to isolate states; following this indeed worked in terms of creating a separate environment, but unfortunately "python -m pip install spacy[cuda92]" still does not work (the same error as in my previous post). python -m pip install spacy[cuda] works but later model install / spacy validate / import spacy fails (cymem error). |
@honnibal Although I mentioned WinPython - I should have said I'm working on Windows 10 (64bit), which I assume is the problem. I surmise a wheel is needed for Windows installations to get Cupy, which in turn is required to get spaCy with GPU support? If this is the case, an extra line on the spaCy installation page would be helpful for Windows users. |
When i try to load the model using spacy (nlp=spacy.load('en_coref_md), I am receiving this error: |
@honnibal Just to update - I'm not able to install spaCy 2.0.16 on Windows 10 64bit / Python 3 at all (with or without GPU support) - without hitting this reoccurring warning messages. I've removed all Python environments, removed all CUDA drivers/SDK, reinstalled using Conda & separate environment (as you kindly explained), different version of Python 3, different Python environments. Although the pip installation looks ok, calling "python -m spacy validate", installing a model or importing spacy always results in the now familiar cymem message (see below). Note that appears to be only a warning and I found that spaCy does seem to work ok. python -m spacy validate (Another related thread: #2907) |
Hey, just to update. Problem still remains with new versions and downgrading to 2.0.12 seems the only solution for now. |
how do I downgrade to 2.0.12? |
|
Could the people having trouble try pip install spacy==2.0.18? Also, which OS and Python version are you using? I can't reproduce the error, and I'm not sure why it wouldn't be working. |
This issue has been automatically closed because there has been no response to a request for more information from the original author. With only the information that is currently in the issue, there's not enough information to take action. If you're the original author, feel free to reopen the issue if you have or find the answers needed to investigate further. |
I'm suffering from the exact same error. Because of the issue #2995 I have upgraded to Traceback (most recent call last):
File "/usr/local/bin/dragonfire", line 11, in <module>
load_entry_point('dragonfire', 'console_scripts', 'dragonfire')()
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 487, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2728, in load_entry_point
return ep.load()
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2346, in load
return self.resolve()
File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 2352, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/mertyildiran/Documents/Dragonfire/dragonfire/__init__.py", line 37, in <module>
from dragonfire.coref import NeuralCoref # Submodule of Dragonfire that aims to create corefference based dialogs
File "/home/mertyildiran/Documents/Dragonfire/dragonfire/coref.py", line 14, in <module>
import en_coref_sm # Small English model for NeuralCoref: a pipeline extension for spaCy 2.0
File "/home/mertyildiran/.local/lib/python3.6/site-packages/en_coref_sm/__init__.py", line 6, in <module>
from en_coref_sm.neuralcoref import NeuralCoref
File "/home/mertyildiran/.local/lib/python3.6/site-packages/en_coref_sm/neuralcoref/__init__.py", line 1, in <module>
from .neuralcoref import NeuralCoref
File "cymem.pxd", line 1, in init en_coref_sm.neuralcoref.neuralcoref
ValueError: cymem.cymem.Pool has the wrong size, try recompiling. Expected 64, got 48 Travis CI build log of the above error huggingface/neuralcoref#102 (comment) tells me to downgrade spaCy to version anything between So which version of spaCy am I gonna use now? Arbitrary version specifications like In conclusion, I don't know what happened in the journey from |
OK, I managed to force But still something got broken in the journey from |
I was also struggling with loading the coref model, and was able to fix this problem by doing: sudo pip3 install cymem==1.31.2 spacy==2.0.12 not sure exactly what that addressed, but it worked. |
Thanks, |
Fixed to install |
The "downgrading trick" to 2.0.12 did not do the trick for me: Any other idea? |
@ZarebskiDavid I managed to build everything and get it working (latest tags). Here's what I had to do. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
I have been running prodigy in Docker and it worked yesterday using the Dockerfile example from github.
Today, I cannot build my docker image, I get an error when i try to download a language model.
If I log into my docker container and run this command:
python -m spacy download en_core_web_sm
Or even this command:
python -m spacy validate
I get this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/local/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/usr/local/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/usr/local/lib/python3.6/site-packages/spacy/init.py", line 8, in
from thinc.neural.util import prefer_gpu, require_gpu
File "/usr/local/lib/python3.6/site-packages/thinc/neural/init.py", line 1, in
from ._classes.model import Model
File "/usr/local/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 12, in
from ..train import Trainer
File "/usr/local/lib/python3.6/site-packages/thinc/neural/train.py", line 3, in
from .optimizers import Adam, SGD, linear_decay
File "optimizers.pyx", line 13, in init thinc.neural.optimizers
File "cymem.pxd", line 1, in init thinc.neural.ops
ValueError: cymem.cymem.Pool has the wrong size, try recompiling. Expected 64, got 48
There is an old issue with the same problem from 2015 that was caused by code version incompatibility. Could this be caused by prodigy code being out of sync with spacy?
The text was updated successfully, but these errors were encountered: