-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR builds upon #412 and finalizes the metadata migration from search spaces / recommenders to `Campaign`, making `Campaign` the only stateful class: * All `allow_*` flags are now passed directly to `Campaign`, strengthening the role of `Campaign` as _the_ class for metadata handling / tracking the progress of an experimentation path. * A corresponding deprecation mechanism is set into place. * The documentation gets updated. * `allow_repeated_recommendations` is renamed to `allow_recommending_already_recommended` because i) the original name was imprecise in that it also suggested that repetitions are disallowed _within_ a batch and ii) the new follows the same pattern as the other two flags. * The flags are now context-aware, i.e. setting flags in contexts where they have no effect now raises an error. This avoids surprises on the user side, which have been reported multiple times. * Replaces the private class `AnnotatedSubspaceDiscrete` with a new private class `FilteredSubspaceDiscrete` taking over the original role but without the necessity of being metadata aware. ### Coming next The changes introduced here and in #423 bring significant improvements from a user interface perspective in that: * Metadata handling now happens entirely behind the scenes * No more fiddling with internal low-level objects (like setting Boolean values in metadata dataframes) is necessary to control candidate generation is necessary. Instead, there is now an interface that enables control via user-level objects such as `Constraint` objects and candidates dataframes. * The `pandas` part of the current discrete search space implementation is less entangled in the code base This paves the way for upcoming enhancements: * A `SubspaceDiscreteProtocol` is already in sight, which allows seamless integration of other backends (`polars`, databases, etc) and will help us complete the ongoing `polars` transition. * An improved user interface for manipulating existing state spaces a la `SubspaceDiscrete.filter(constraints)`, which can also become the backbone of the current constraints logic
- Loading branch information
Showing
34 changed files
with
672 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.