Closed slbayer closed 1 year ago
I dug into this some more. The argument markers are updated in the _post_prepare()
method of the task module, which is called by prepare()
. But when I call prepare()
directly, it complains that The taskmodule is already prepared, do not prepare again.
. But it goes on to run _post_prepare()
, and so the process continues without error. There's something messed up in the logic for this task module, I think.
@slbayer Thanks a lot for reporting this! It is indeed a bug caused by a recent refactor. It should be fixed by #260. Can you try installing this branch and check if it works for you?
Version 0.13.0. Sample code is essentially identical to https://huggingface.co/spaces/pie/Joint-NER-and-Relation-Extraction/blob/main/app.py:
Running this on a simple text document gives me an error in
re_pipeline()
:My setup is Python 3.9 on MacOS. Clean venv in which I ran
pip install pytorch-ie
Encountered an error when importing
pytorch-ie
in my code:ImportError: cannot import name 'CommitOperationAdd' from 'huggingface_hub' (/[deleted]/pytorch-ie-venv/lib/python3.9/site-packages/huggingface_hub/__init__.py)
huggingface_hub version was 0.5.1, ran
pip install --upgrade huggingface-hub
, which warned me thatpytorch-ie
expected nothing higher than 0.5.1, but got me past that error, only to hit the assertion error above.Thanks in advance.