diff --git a/.gitignore b/.gitignore index a2603c8..e7bbe5b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,8 @@ env docs/_build .coverage Makefile -make.bat \ No newline at end of file +make.bat + +build/ +dist/ +*.egg-info \ No newline at end of file diff --git a/entmoot/__version__.py b/entmoot/__version__.py index 75ae201..49af14e 100644 --- a/entmoot/__version__.py +++ b/entmoot/__version__.py @@ -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" diff --git a/entmoot/optimizers/gurobi_opt.py b/entmoot/optimizers/gurobi_opt.py index 4025bbd..0840c4d 100644 --- a/entmoot/optimizers/gurobi_opt.py +++ b/entmoot/optimizers/gurobi_opt.py @@ -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 """ diff --git a/setup.py b/setup.py index 8a3107b..6f8d791 100644 --- a/setup.py +++ b/setup.py @@ -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" ], diff --git a/tests/test_curr.py b/tests/test_curr.py index 2402abd..35da508 100644 --- a/tests/test_curr.py +++ b/tests/test_curr.py @@ -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(): @@ -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) @@ -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) @@ -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