mirror of
https://gitee.com/fastnlp/fastNLP.git
synced 2024-12-01 11:48:09 +08:00
修改evaluate_dataloader的报错信息
This commit is contained in:
parent
f27d53261c
commit
9d50e99bfb
@ -219,10 +219,10 @@ class Trainer(TrainerEventTrigger):
|
|||||||
|
|
||||||
""" 设置内部的 Evaluator """
|
""" 设置内部的 Evaluator """
|
||||||
if metrics is None and evaluate_dataloaders is not None:
|
if metrics is None and evaluate_dataloaders is not None:
|
||||||
raise ValueError("You have set 'validate_dataloader' but forget to set 'metrics'.")
|
raise ValueError("You have set 'evaluate_dataloader' but forget to set 'metrics'.")
|
||||||
|
|
||||||
if metrics is not None and evaluate_dataloaders is None:
|
if metrics is not None and evaluate_dataloaders is None:
|
||||||
raise ValueError("You have set 'metrics' but forget to set 'validate_dataloader'.")
|
raise ValueError("You have set 'metrics' but forget to set 'evaluate_dataloader'.")
|
||||||
|
|
||||||
self.evaluator = None
|
self.evaluator = None
|
||||||
self.monitor = monitor
|
self.monitor = monitor
|
||||||
|
Loading…
Reference in New Issue
Block a user