translation evaluation pipeline

This commit is contained in:
slin000111
2023-05-11 15:11:22 +08:00
parent 1c5222d6c1
commit d76303d324

View File

@@ -42,7 +42,11 @@ class TranslationEvaluationPipeline(Pipeline):
`"EvaluationMode.SRC"`, `"EvaluationMode.REF"`. Aside from hypothesis, the
source/reference/source+reference can be presented during evaluation.
"""
super().__init__(model=model, preprocessor=preprocessor, **kwargs)
super().__init__(
model=model,
preprocessor=preprocessor,
compile=kwargs.pop('compile', False),
compile_options=kwargs.pop('compile_options', {}))
self.eval_mode = eval_mode
self.checking_eval_mode()