Skip to content

Commit

Permalink
Merge branch 'master' into feature/problemconfig_rng
Browse files Browse the repository at this point in the history
  • Loading branch information
TobyBoyne committed Jul 2, 2024
2 parents 732f27b + 7b18b21 commit 548f11f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ env
docs/_build
.coverage
Makefile
make.bat
make.bat

build/
dist/
*.egg-info
2 changes: 1 addition & 1 deletion entmoot/__version__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "1.0.4"
__version__ = "2.0.1"
__author__ = "Alexander Thebelt"
__author_email__ = "alexander.thebelt18@imperial.ac.uk"
__license__ = "BSD 3-Clause License"
2 changes: 1 addition & 1 deletion entmoot/optimizers/gurobi_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def solve(
model_core: gur.Model = None,
weights: tuple = None,
use_env: bool = False,
) -> namedtuple:
) -> OptResult:
"""
Solves the Gurobi optimization model
"""
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
url="https://github.com/cog-imperial/entmoot",
packages=find_packages(exclude=["tests", "docs"]),
install_requires=[
"numpy",
"lightgbm==4.0.0",
"numpy<=2.0.0",
"lightgbm>=4.0.0",
"gurobipy",
"pyomo"
],
setup_requires=[
"numpy",
"lightgbm==4.0.0",
"numpy<=2.0.0",
"lightgbm>=4.0.0",
"gurobipy",
"pyomo"
],
Expand Down
7 changes: 4 additions & 3 deletions tests/test_curr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np
import pytest
import random
import pyomo.environ # noqa: F401

@pytest.mark.pipeline_test
def test_core_model_copy():
Expand All @@ -32,7 +33,7 @@ def test_core_model_copy():
assert len(core_model_pyomo._all_feat) == len(core_model_pyomo_copy._all_feat)


@pytest.mark.pipeline_test
# @pytest.mark.pipeline_test
def test_multiobj_constraints():
# define problem
problem_config = ProblemConfig(rnd_seed=73)
Expand Down Expand Up @@ -98,7 +99,7 @@ def test_multiobj_constraints():
assert round(x_opt, 5) == round(y_opt, 5) and round(y_opt, 5) == round(z_opt, 5)


@pytest.mark.pipeline_test
# @pytest.mark.pipeline_test
def test_simple_test():
def my_func(x: float) -> float:
return x**2 + 1 + random.uniform(-0.2, 0.2)
Expand Down Expand Up @@ -172,7 +173,7 @@ def test_compare_pyomo_gurobipy_multiobj():
assert math.isclose(res_gur.opt_val, res_pyo.opt_val, abs_tol=0.01)


@pytest.mark.pipeline_test
# @pytest.mark.pipeline_test
def test_compare_pyomo_gurobipy_singleobj():
"""
Ensures for a single objective example with l1 and l2 uncertainty metric and mixed feature types that optimization
Expand Down

0 comments on commit 548f11f

Please sign in to comment.