Skip to content

Commit

Permalink
LmDataset, corpus_file type check more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Dec 23, 2024
1 parent 69d493a commit 0859426
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion returnn/datasets/lm.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ def _maybe_report_status():
last_print_time = time.time()

# If a list of files is provided, concatenate all.
if not isinstance(corpus_file, list):
if isinstance(corpus_file, str):
corpus_file = [corpus_file]
assert isinstance(corpus_file, (tuple, list))
prev_orth_len = 0
for file_name in corpus_file:
if self._use_cache_manager:
Expand Down

0 comments on commit 0859426

Please sign in to comment.