AttributeError raised when validating with an empty validation set or a missing valid.csv
Created by: prhbrt
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.