-
Notifications
You must be signed in to change notification settings - Fork 27
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
Issue of install FastCoref in Colab #59
Comments
!pip install -q pyarrow==14.0.1 datasets==2.10.0 |
Thanks for help but problems stays the same: !pip install -q pyarrow==14.0.1 datasets==2.10.0 !pip install fastcoref -q from fastcoref import FCoref model = FCoref(device='cuda:0')model = FCoref(device='cpu') /usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_token.py:89: UserWarning:
|
no, it's not the same :) The new error means |
Hey. You can use this to go around the error you've seen. @xiongjun926g . Seems to load and do inference fine on transformers 4.45.1 from fastcoref import LingMessCoref as OriginalLingMessCoref
from fastcoref import FCoref as OriginalFCoref
from transformers import AutoModel
import functools
class PatchedLingMessCoref(OriginalLingMessCoref):
def __init__(self, *args, **kwargs):
original_from_config = AutoModel.from_config
def patched_from_config(config, *args, **kwargs):
kwargs['attn_implementation'] = 'eager'
return original_from_config(config, *args, **kwargs)
try:
AutoModel.from_config = functools.partial(patched_from_config, attn_implementation='eager')
super().__init__(*args, **kwargs)
finally:
AutoModel.from_config = original_from_config
class PatchedFCoref(OriginalFCoref):
def __init__(self, *args, **kwargs):
original_from_config = AutoModel.from_config
def patched_from_config(config, *args, **kwargs):
kwargs['attn_implementation'] = 'eager'
return original_from_config(config, *args, **kwargs)
try:
AutoModel.from_config = functools.partial(patched_from_config, attn_implementation='eager')
super().__init__(*args, **kwargs)
finally:
AutoModel.from_config = original_from_config
model1 = PatchedLingMessCoref(
nlp="en_core_web_lg",
device="cpu"
)
model2 = PatchedFCoref(
nlp="en_core_web_lg",
device="cpu"
)
# Run your stuff here |
This works for me, and the error output actually already states how to fix this problem: |
@shon-otmazgin Can you please implement that fix. It's an easy one. Thanks. |
Any update...? |
Its been working fantastic till last week in colab.
!pip install fastcoref==2.1.5 -q
!pip install fastcoref==1.6.0 -q
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 474.3/474.3 kB 8.1 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 23.7 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.3/116.3 kB 5.4 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 207.3/207.3 kB 11.2 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.9/39.9 MB 12.9 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 311.4/311.4 kB 7.1 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 134.8/134.8 kB 6.0 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.1/194.1 kB 6.8 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 kB 845.9 kB/s eta 0:00:00
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
cudf-cu12 24.4.1 requires pyarrow<15.0.0a0,>=14.0.1, but you have pyarrow 17.0.0 which is incompatible.
ibis-framework 8.0.0 requires pyarrow<16,>=2, but you have pyarrow 17.0.0 which is incompatible.
from fastcoref import FCoref
model = FCoref(device='cuda:0')
model = FCoref(device='cpu')
AttributeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from fastcoref import FCoref
2 # model = FCoref(device='cuda:0')
3 model = FCoref(device='cpu')
9 frames
/usr/local/lib/python3.10/dist-packages/pyarrow/_compute.pyx in init pyarrow._compute()
AttributeError: module 'pyarrow.lib' has no attribute 'ListViewType'
import pyarrow
pyarrow.version
14.0.2
The text was updated successfully, but these errors were encountered: