Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise an error for invalid scatter data #1018

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# 2.0.2

## Improvements
- Add an error when we get an empty dict data_to_scatter so that we can avoid an internal error caused in Dask precautiously

## Bugfixes
- Fix bug in the incumbent selection in the case that multi-fidelity is combined with multi-objective (#1019).

Expand Down
3 changes: 3 additions & 0 deletions smac/facade/abstract_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ def optimize(self, *, data_to_scatter: dict[str, Any] | None = None) -> Configur
Best found configuration.
"""
incumbents = None
if isinstance(data_to_scatter, dict) and len(data_to_scatter) == 0:
raise ValueError("data_to_scatter must be None or dict with some elements, but got an empty dict.")

try:
incumbents = self._optimizer.optimize(data_to_scatter=data_to_scatter)
finally:
Expand Down