Skip to content

Commit

Permalink
Fix empty training data validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianSosic committed Jun 3, 2024
1 parent 1691110 commit b3c09d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion baybe/recommenders/pure/bayesian/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def recommend( # noqa: D102
f"that an objective is specified."
)

if measurements is None:
if (measurements is None) or (len(measurements) == 0):
raise NotImplementedError(
f"Recommenders of type '{BayesianRecommender.__name__}' do not support "
f"empty training data."
Expand Down

0 comments on commit b3c09d1

Please sign in to comment.