Skip to content

Commit

Permalink
Merge branch 'rvankoert:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
rvankoert committed Apr 24, 2024
2 parents a8947ec + 60ee295 commit 2bd9abd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/data/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,15 @@ def _process_raw_data(self) -> Tuple[Dict[str, List[str]],
partition_name=partition,
text_file=partition_text_file,
)
if len(file_names) == 0:
raise ValueError("No data found for the specified "
f"{partition} list(s). Have you verified "
"the data paths?")

if partition == "train" and not self.charlist:
raise ValueError("Character list is empty. Please provide "
"a valid character list or ensure that "
"the training data is correctly "
"formatted.")
raise ValueError("Character list is empty after "
"creating training data. Did you "
"forget to provide a character list?")

# Fill the dictionary with the data
file_names_dict[partition] = file_names
Expand Down

0 comments on commit 2bd9abd

Please sign in to comment.