Candidates Engine - #837
Draft
AdrianSosic wants to merge 242 commits into
Draft
Conversation
Expecting a grouped constaint input from the user is unnecessary since we can also take care of the grouping internally.
Using version from beginnign of 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The test would need to be updated but: * The entire point of the test is unclear * comp_rep_bounds will soon become obsolete and dropped
Co-authored-by: Myra <myra.zmarsly@outlook.com>
Co-authored-by: Myra <myra.zmarsly@outlook.com>
Co-authored-by: Fabian Liebig <109472293+fabianliebig@users.noreply.github.com>
The test always called the function with arguments in the wrong order. This went unnoticed because get_transform_objects previously used set(df), which silently accepts any iterable. The narwhalify commit switched to df.columns, which requires an actual dataframe and exposed the latent bug.
Narwhalifies the core transformation pipeline covering * parameter encoding * searchspace transformation * target transformation * objective transformation A pandas index workaround remains in a few transform methods, pending a follow-up rework of the recommender layer.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #793
PRs merged
SubspaceDiscrete.constraints#835DiscreteParameter.transform#862Upcoming PRs
get_candidateslazificationTo be decided
is_constrainedproperty of the search space classes be dropped? Reasons:SubspaceContinuous.is_constrainedused to contain non-trivial logic but with the new design it's equivalent to a simpleif self.constraintscallSubspaceDiscrete.is_constrainedwas very much meaningless since theconstraintsattribute itself was flawed (DeprecateSubspaceDiscrete.constraints#835). And with both the legacy and new design, it's not obvious what it actually means!is_constrainedattribute only on some of the search space classes is asymmetricSubspaceDiscrete.batch_constraintsvsDiscreteBatchConstraintname conflict. Options:batch_constraintsto something else, e.g.recommendation_constraints. However,batch_constraintsis already a generic term. Perhaps we should rather ...DiscreteBatchConstraintto something more specific. The latter is actually rather a name for an abstract base class if we decide to add more batch-level constraints, and does not convey anything about what it does. Options would be in the direction ofDiscreteSharedValueConstraintn_batches_doneandn_fits_done?eval_during_creationandeval_during_modelingare currently not mutually exclusive, so the semantics are not 100% clear, hence theassertstatements insearchspace/discrete.py<-- clean up during constraint refactoring?complete unfiltered space,filtered spaceorpolicy-generated subset? Decision depends heavily on what is cheap and possible in a large lazy space but also what makes conceptually sense (i.e. should adding a hypothetical candidate that is removed through a filter, e.g. by policy or active values, change the induced scaling?). Also impacts methods likecomp_rep_bounds, which now behave differently compared tomain(Refactor candidates interface #840 (comment)). At the same time, the discrete version ofcomp_rep_boundsmay be dropped entirely since effectively unused at the moment (it's called inoptimize_acqf_mixedbut the discrete bounds should actually not matter since the candidates are explicitly piped in as separate argument --> needs investigation)EmptyCandidatesvsNullCandidatesencodevstransformvscomputational representationterminology. Transform is currently used for continuous-valued objects (e.g. target transforms) but also for in the parameter/searchspace context. However, the latter also usesencoding(e.g. discrete parameters have specified encodings, we have a correspondingly named base class, ...). We somehow need to make this more precise. Perhaps: transform for conti mappings and encode for discrete mappings? Also covers things like the_encoding_tablemethods etc.TODOs
SubspaceDiscreteand turncomp_repintocached_propertyFollow-up TODOs (after dev completion)