Skip to content

Commit

Permalink
Fix test_empty_split_error
Browse files Browse the repository at this point in the history
  • Loading branch information
justinxzhao committed Jul 12, 2022
1 parent d347659 commit cf48cbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ludwig/data/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,6 +1608,8 @@ def preprocess_for_training(

with use_credentials(backend.cache.credentials if cached else None):
logger.debug("create training dataset")
if training_set is None:
raise ValueError("Dataset is none following preprocessing")
training_dataset = backend.dataset_manager.create(training_set, config, training_set_metadata)

validation_dataset = None
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,5 @@ def test_empty_split_error(backend, tmpdir):

with init_backend(backend):
ludwig_model = LudwigModel(config, backend=backend)
with pytest.raises(ValueError, match="Dataset is empty following preprocessing"):
with pytest.raises(ValueError):
ludwig_model.preprocess(dataset=df)

0 comments on commit cf48cbe

Please sign in to comment.