fix(eval): no need to check length of valid_dl when using streaming dataset (#274)

* fix(eval): StreamingDataset does not have an __len__ method.

* fix(eval): StreamingDataset has no len method
pull/279/head
Shuo Zhang 2023-09-04 23:14:07 +08:00 committed by GitHub
parent 3d091c302d
commit 5238f15e2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ def evaluate_on_val_dls(
dist.barrier()
val_res = val_metric.get_metric()
if verbose and len(val_dl) != 0:
if verbose and (streaming or len(val_dl) != 0):
val_loss = val_loss / (val_idx + 1 + 1e-6)
infos = {
"step": step_count,