Skip to content

Commit

Permalink
Fix an undefined variable corner-case.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 553265728
  • Loading branch information
sdenton4 authored and copybara-github committed Aug 2, 2023
1 parent 7b69438 commit 8d19d29
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chirp/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def get_dataset(
read_config = tfds.ReadConfig(add_tfds_id=True)

datasets = []
dataset_info = None
for dataset_dir in dataset_directory:
if tfds_data_dir:
tfds.core.add_data_dir(tfds_data_dir)
Expand Down Expand Up @@ -106,6 +107,8 @@ def get_dataset(
)
)
ds = ds.prefetch(2)
if dataset_info is None:
raise RuntimeError('No datasets loaded.')
return ds, dataset_info


Expand Down

0 comments on commit 8d19d29

Please sign in to comment.