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

Refactor recommender signature #220

Merged
merged 23 commits into from
Jun 4, 2024
Merged

Refactor recommender signature #220

merged 23 commits into from
Jun 4, 2024

Conversation

AdrianSosic
Copy link
Collaborator

This PR implements a breaking change by refactoring the recommender signature such that:

  • it accepts an optional Objective
  • it expects training data as a single dataframe in experimental representation

Apart from fixing certain responsibilities (e.g. Campaign now only acts as a meta-data handler, just like it is supposed to) this enables/prepares several new features:

  • Users can directly use Recommenders as entry point instead of being forced to go via Campaign
  • Because recommenders now operate on experimental representations, they can offer the same interface back to users, e.g. when exposing model-internal things such as acquisition functions and surrogate models
  • Additional pre-processing steps that require access to the experimental representation (such as data-augmentation) can now happen inside recommenders

@AdrianSosic
Copy link
Collaborator Author

Hi @AVHopp, this PR might come somewhat surprising to you because it is contrary to what we have agreed on, but there have been new developments that require us to prioritize this. Can give you an update in a call 🙃

baybe/campaign.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@AVHopp AVHopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried my best to wrap my head around this :D See all of my individual comments.

baybe/campaign.py Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
baybe/recommenders/base.py Outdated Show resolved Hide resolved
baybe/recommenders/meta/sequential.py Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
baybe/recommenders/meta/base.py Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
tests/conftest.py Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
baybe/recommenders/pure/bayesian/base.py Outdated Show resolved Hide resolved
baybe/recommenders/naive.py Outdated Show resolved Hide resolved
baybe/recommenders/naive.py Outdated Show resolved Hide resolved
@AdrianSosic
Copy link
Collaborator Author

Hi @AVHopp, @Scienfitz: have refactored the code quite a bit during rebasing in order to 1) incorporate your comments and 2) improve the design a bit further. This makes many of the existing threads obsolete since the corresponding code lines no longer exist. Will close them and mark with obsolete after refactoring.

That means basically: let's have another fresh look at the PR 🙃 Mypy problems are now also resolved. There are two remaining open points to discuss for which I'll open separate threads

@AdrianSosic AdrianSosic force-pushed the refactor/recommender branch from 52bcebb to 7b41958 Compare May 15, 2024 12:46
@AdrianSosic AdrianSosic force-pushed the refactor/recommender branch 4 times, most recently from 7118a02 to 88258cb Compare May 29, 2024 14:51
@AdrianSosic AdrianSosic force-pushed the refactor/recommender branch from 88258cb to b3c09d1 Compare June 3, 2024 15:57
@AdrianSosic AdrianSosic force-pushed the refactor/recommender branch from b3c09d1 to c75ad17 Compare June 4, 2024 13:42
@AdrianSosic AdrianSosic merged commit f064b7f into main Jun 4, 2024
10 checks passed
@AdrianSosic AdrianSosic deleted the refactor/recommender branch June 4, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants