DeepPavlov icon indicating copy to clipboard operation
DeepPavlov copied to clipboard

AttributeError raised when validating with an empty validation set or a missing valid.csv

Open prhbrt opened this issue 5 years ago • 0 comments

DeepPavlov 0.5.0, Python 3.7.6, Ubuntu 20.04

When the validation set is empty, this error

 AttributeError: 'NoneType' object has no attribute 'items'

is raised by

metrics = list(report['metrics'].items())

because the value for "metrics" is set to None here.

I would suggest the training to proceed with nan-values for the metrics or a clearer error to be raised when the validation set is empty but "val_every_n_epochs" or "val_every_n_batches" are set.

prhbrt avatar Jun 11 '20 08:06 prhbrt