-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error while import MonoT5 from Pygaggle #2
Comments
While installing pygaggle and related dependencies. I received following error. 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. Here is pip freeze: |
I am running CrisisFACT.ipynb notebook on Colab on Python v3.9.16
Used colab's fallback runtime version.
I am getting error while importing monoT5 from pygaggle. Kindly help me resolve the issue @rodrigonogueira4, @jayralencar
1 from pygaggle.rerank.base import Query, Text
----> 2 from pygaggle.rerank.transformer import MonoT5
3
4 reranker = MonoT5(model=model)
7 frames
/usr/local/lib/python3.9/dist-packages/pygaggle/rerank/transformer.py in
11 import torch
12 from .base import Reranker, Query, Text
---> 13 from .similarity import SimilarityMatrixProvider
14 from pygaggle.model import (BatchTokenizer,
15 LongBatchEncoder,
/usr/local/lib/python3.9/dist-packages/pygaggle/rerank/similarity.py in
3 import torch
4
----> 5 from pygaggle.model.encode import SingleEncoderOutput
6
7
/usr/local/lib/python3.9/dist-packages/pygaggle/model/init.py in
4
5 from .decode import *
----> 6 from .encode import *
7 from .evaluate import *
8 from .serialize import *
/usr/local/lib/python3.9/dist-packages/pygaggle/model/encode.py in
6 import torch.nn as nn
7
----> 8 from .tokenize import BatchTokenizer
9 from pygaggle.rerank.base import TextType
10
/usr/local/lib/python3.9/dist-packages/pygaggle/model/tokenize.py in
170
171
--> 172 class SpacySenticizer:
173 nlp = English()
174 nlp.add_pipe(nlp.create_pipe('sentencizer'))
/usr/local/lib/python3.9/dist-packages/pygaggle/model/tokenize.py in SpacySenticizer()
172 class SpacySenticizer:
173 nlp = English()
--> 174 nlp.add_pipe(nlp.create_pipe('sentencizer'))
175
176 def init(self, max_paragraph_length: int = None):
/usr/local/lib/python3.9/dist-packages/spacy/language.py in create_pipe(self, name, config)
300 raise KeyError(Errors.E002.format(name=name))
301 factory = self.factories[name]
--> 302 return factory(self, **config)
303
304 def add_pipe(
/usr/local/lib/python3.9/dist-packages/spacy/language.py in factory(nlp, **cfg)
1043 def factory(nlp, **cfg):
1044 if hasattr(obj, "from_nlp"):
-> 1045 return obj.from_nlp(nlp, **cfg)
1046 elif isinstance(obj, class_types):
1047 return obj()
pipes.pyx in spacy.pipeline.pipes.Sentencizer.from_nlp()
TypeError: type() takes 1 or 3 arguments
The text was updated successfully, but these errors were encountered: