Getting error <lambda>() takes 0 positional arguments but 1 was given when trying to import evaluator
DanielMoreiraPinto opened this issue · comments
Daniel Moreira Pinto commented
I'm trying to use evaluator in a Google Colab notebook, but I can't import it. I installed it with:
!pip install evaluate[evaluator]
Then trying importing it:
from evaluate import evaluator
or simply import evaluate
But I'm getting this error when running the cell:
[<ipython-input-40-03c510640e72>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from evaluate import evaluator
2 # perplexity = evaluate.load("perplexity", module_type="metric")
3 # input_texts = ["lorem ipsum", "Happy Birthday!", "Bienvenue"]
4
5 # results = perplexity.compute(model_id='google/flan-t5-base',
11 frames
[/usr/lib/python3.10/_pyio.py](https://localhost:8080/#) in __init__(self, buffer, encoding, errors, newline, line_buffering, write_through)
2043 encoding = "utf-8"
2044 else:
-> 2045 encoding = locale.getpreferredencoding(False)
2046
2047 if not isinstance(encoding, str):
TypeError: <lambda>() takes 0 positional arguments but 1 was given
Can anyone shine a light on it, please?