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

update entmoot version #464

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

update entmoot version #464

wants to merge 2 commits into from

Conversation

R-M-Lee
Copy link
Contributor

@R-M-Lee R-M-Lee commented Nov 19, 2024

No description provided.

@R-M-Lee R-M-Lee linked an issue Nov 19, 2024 that may be closed by this pull request
@R-M-Lee
Copy link
Contributor Author

R-M-Lee commented Nov 19, 2024

Hi @TobyBoyne , could you please take a look? Do we need a new entmoot release to fix this? I would like to use entmoot via bofire with pyomo and Gurobi cloud in the background as per our exchange a few months ago (look at the lint test below)

@TobyBoyne
Copy link
Collaborator

Hi @R-M-Lee. If I remember correctly, Pyomo 6.7.1 introduced a bug that broke ENTMOOT. We then fixed the version of Pyomo to 6.7.0 in this PR (cog-imperial/entmoot#41). I think that we just need to fix Pyomo to the same version in BoFire in order to resolve this.

@R-M-Lee
Copy link
Contributor Author

R-M-Lee commented Nov 20, 2024

Thanks for the reply! I'll give it a try

@R-M-Lee R-M-Lee changed the title entmoot >=2.0.2 in setup.py update entmoot version Nov 20, 2024
@R-M-Lee
Copy link
Contributor Author

R-M-Lee commented Nov 21, 2024

@TobyBoyne there are some tests failing for what I believe is an unrelated reason and we'll clear that up separately. But one ENTMOOT-specific thing caught my eye in https://github.com/experimental-design/bofire/actions/runs/11936229378/job/33306622223?pr=464

FAILED tests/bofire/strategies/test_enting.py::test_domain_to_problem_config - ValueError: No support for feat_type 'binary'. Check feature 'if3'. FAILED tests/bofire/strategies/test_enting.py::test_convert_constraint_to_entmoot - ValueError: No support for feat_type 'binary'. Check feature 'if3'.

ENTMOOT doesn't like binary features apparently, but one is getting created when we do the domain conversion. Were there changes related to this in ENTMOOT too?

@TobyBoyne
Copy link
Collaborator

If I had to guess, it's do to with these lines [1]. The logic is a bit curious - we only check to see if the feature is binary if no bounds are provided. Since I believe the bofire implementation provides the trivial bounds [0, 1], we never actually test if the feature is binary.

Some quick fixes would be:

  • In BoFire, change the bounds for a binary feat to be None [2]
  • In ENTMOOT, fix this incorrect logic.

A long term fix would be to use the BoFire feature API in ENTMOOT directly. I'm not sure how you would feel about this circular dependency (I personally think it would be fine, since we would only need the minimal BoFire installation in ENTMOOT), however this would take a non-trivial amount of time to implement (discussion at cog-imperial/entmoot#45)

[1] https://github.com/cog-imperial/entmoot/blob/4057ae37a4b84fc148032ce60e5f71990f490986/entmoot/problem_config.py#L287-L288

[2]

bounds = (int(feature.lower_bound), int(feature.upper_bound))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bump entmoot version
2 participants