We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Evaluator class should return the N scores for N inputs, but it omits an output when an empty input is given.
Evaluator
pip install pymarian
from huggingface_hub import hf_hub_download as hf_get from pymarian import Evaluator model_id = "marian-nmt/bleurt-20" model = hf_get(model_id, filename="checkpoints/marian.model.bin") vocab = hf_get(model_id, filename="vocab.spm") evaluator = Evaluator.new(model_file=model, vocab_file=vocab, like="bleurt", cpu_threads=8) for score in evaluator.evaluate(["\t"]): print(score)
It causes the assertion error:
Traceback (most recent call last): File "<stdin>", line 10, in <module> File "<path_to_pymarian>/pymarian/__init__.py", line 142, in evaluate assert len(scores) == len(batch) AssertionError
In this example, the len(batch) will be 1, but len(scores) will be 0.
len(batch)
len(scores)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug description
Evaluator
class should return the N scores for N inputs, but it omits an output when an empty input is given.How to reproduce
pip install pymarian
It causes the assertion error:
In this example, the
len(batch)
will be 1, butlen(scores)
will be 0.Context
The text was updated successfully, but these errors were encountered: