Skip to content

Commit

Permalink
Allow for no splits to be defined in the tasks and raise a warning.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 631804931
  • Loading branch information
SeqIO Team authored and SeqIO committed May 8, 2024
1 parent 444a311 commit 6499dec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions seqio/dataset_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,8 @@ def get_dataset( # pytype: disable=signature-mismatch # overriding-parameter-t
self._check_compatible_features()
tasks = []
for task in self.tasks:
if not task.source.splits:
logging.warning("Task %s has no splits defined, skipping.", task.name)
if split not in task.splits:
logging.warning(
"Task %s has no '%s' split, skipping.", task.name, split
Expand Down

0 comments on commit 6499dec

Please sign in to comment.