-
Notifications
You must be signed in to change notification settings - Fork 47
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
Simplify and extend meta recommender logic #457
Conversation
@AVHopp @Scienfitz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incomplete review since there was another issues that required my attention, but still a first bunch of comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last bit of my review that was still missing.
Extract common logic into new base class
Requiring that they are composed of pure recommenders is an unnecessary limitation. Allowing other meta recommenders as building blocks can indeed be useful, for example, using a two-phase recommender where the second phase uses an adaptive (e.g. batch-size dependent) meta recommender
1f526d5
to
6a44b2e
Compare
This PR refines the semantics of Meta recommenders and extends their use. It was motivated by two problems:
allow_*
flags toCampaign
#423 wherepending_experiments
should only be passed toBayesianRecommenders
. Unfortunately, with the current meta recommender interface, it is not straightforward (or impossible?) to identify what exactly the next recommender will be – which indicates a suboptimal design.The important things changed:
MetaRecommender
s now have a much simpler logic, i.e. they only contain aselect_recommender
, which always just returns the recommender appropriate for the context of the call. Previous statefulness, which was only relevant to sequential recommenders, has been moved to the corresponding classes.is_stateful
Boolean propertyget_non_meta_recommender
method for extracting the appropriate context-specific non-meta recommender from the hierarchyAdded the newBatchSizeAdaptiveMetaRecommender
, which can be useful, e.g. to avoid too costly optimizations for large batch sizes.TwoPhaseMetaRecommender
now has an explicitremain_switch
option to clarify its behavior.