Skip to content

Commit

Permalink
fix created (#6421)
Browse files Browse the repository at this point in the history
Signed-off-by: Dima Rekesh <[email protected]>
  • Loading branch information
bmwshop authored and hsiehjackson committed Apr 14, 2023
1 parent dcbceb6 commit 46dd09c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/utils/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def resolve_validation_dataloaders(model: 'ModelPT'):
dataloaders.append(model._validation_dl)

model._validation_dl = dataloaders
if isinstance(ds_values[0], (dict, DictConfig)):
if len(ds_values) > 0 and isinstance(ds_values[0], (dict, DictConfig)):
# using the name of each of the nested dataset
model._validation_names = [ds.name for ds in ds_values]
else:
Expand Down Expand Up @@ -359,7 +359,7 @@ def resolve_test_dataloaders(model: 'ModelPT'):
dataloaders.append(model._test_dl)

model._test_dl = dataloaders
if isinstance(ds_values[0], (dict, DictConfig)):
if len(ds_values) > 0 and isinstance(ds_values[0], (dict, DictConfig)):
# using the name of each of the nested dataset
model._test_names = [ds.name for ds in ds_values]
else:
Expand Down

0 comments on commit 46dd09c

Please sign in to comment.