Skip to content

Commit

Permalink
Merge pull request #281 from mynhardtburger/max_number_error_message_0.3
Browse files Browse the repository at this point in the history
Add max size information to error message [release-0.3]
  • Loading branch information
joerunde authored Nov 29, 2023
2 parents e91b317 + d7e6d38 commit e210cec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions caikit_nlp/toolkit/trainer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ def validate_training_data(train_stream: DataStream, model_name: str, module_id:
)

if max_num_examples > 0:
train_stream_size = len(train_stream)
error.value_check(
"<NLP77627434E>",
len(train_stream) <= max_num_examples,
"Number of examples larger than maximum number of examples allowed for this model",
train_stream_size <= max_num_examples,
"Number of examples ({}) exceeds the maximum number of examples allowed "
"({}) for this model",
train_stream_size,
max_num_examples,
)


Expand Down

0 comments on commit e210cec

Please sign in to comment.