mirror of https://github.com/InternLM/InternLM
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 methodpull/279/head
parent
3d091c302d
commit
5238f15e2d
|
@ -136,7 +136,7 @@ def evaluate_on_val_dls(
|
||||||
dist.barrier()
|
dist.barrier()
|
||||||
|
|
||||||
val_res = val_metric.get_metric()
|
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)
|
val_loss = val_loss / (val_idx + 1 + 1e-6)
|
||||||
infos = {
|
infos = {
|
||||||
"step": step_count,
|
"step": step_count,
|
||||||
|
|
Loading…
Reference in New Issue