Progress bar crash when empty dataset
I accidentally filtered out all examples and tried to evaluate on an empty dataset.
Was getting a confusing crash in the progress bar code as self.target == 0.
See here
Could you please share an example to reproduce the reported behavior. Thanks
So self.target was set to 0 in keras/src/utils/progbar.py, as i passed in a dataset with all examples filtered out :face_exhaling:.
numdigits = int(math.log10(self.target)) + 1 then tries to take log of 0.
Hi @stridge-cruxml, I don't think throwing an error is unreasonable in this situation. What behavior would you expect from Keras?
I think just a warning "dataset is empty"?
I can imagine some complicated thing where someone filters different examples each epoch. The rest of the code doesn't seem to mind empty datasets.