diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cde9b518..6d5c489c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: ["3.8", "3.9", "3.10"] + python: ["3.9", "3.10"] group: [1, 2, 3, 4, 5] steps: @@ -149,4 +149,4 @@ jobs: git push origin $TAG_NAME else echo "If this was the main branch, I would push a new tag named $TAG_NAME" - fi \ No newline at end of file + fi diff --git a/pyproject.toml b/pyproject.toml index d5fb6931..5f76ab13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ keywords = [ [tool.poetry.dependencies] # Core dependencies -python = "^3.8, <3.11" +python = "^3.9, <3.11" pandas = "^1.1.0" scipy = ">=1.8.0" numpy = "^1.21.0" @@ -31,7 +31,7 @@ llvmlite = "^0.38.0" numba = "^0.55.0" fastprogress = "^0.2.3" matplotlib = "^3.2.2" -scikit-learn = "^1.0" +scikit-learn = "^1.4" torch = "^1.11.0" skorch = "^0.11.0" cython = "^0.29.21" diff --git a/summit/benchmarks/experimental_emulator.py b/summit/benchmarks/experimental_emulator.py index 6201b313..9664d47c 100644 --- a/summit/benchmarks/experimental_emulator.py +++ b/summit/benchmarks/experimental_emulator.py @@ -37,11 +37,11 @@ _deprecate_positional_args, indexable, check_is_fitted, - _check_fit_params, + _check_method_params, ) from sklearn.utils import check_array, _safe_indexing -from sklearn.utils.fixes import delayed -from sklearn.metrics._scorer import _check_multimetric_scoring +from sklearn.utils.parallel import delayed +from sklearn.metrics._scorer import _check_multimetric_scoring, _MultimetricScorer from scipy.sparse import issparse @@ -366,7 +366,8 @@ def test(self, **kwargs): scorers = check_scoring(predictor, scoring) else: scorers = _check_multimetric_scoring(predictor, scoring) - scores_list.append(_score(predictor, X_test, y_test, scorers)) + scorers = _MultimetricScorer(scorers=scorers) + scores_list.append(_score(predictor, X_test, y_test, scorers, score_params = None)) scores_dict = _aggregate_score_dicts(scores_list) for name in scoring: scores = scores_dict.pop(name) @@ -1158,7 +1159,7 @@ def fit(self, X, y=None, *, groups=None, **fit_params): refit_metric = self.refit X, y, groups = indexable(X, y, groups) - fit_params = _check_fit_params(X, fit_params) + fit_params = _check_method_params(X, fit_params) cv_orig = check_cv(self.cv, y, classifier=is_classifier(estimator)) n_splits = cv_orig.get_n_splits(X, y, groups) diff --git a/summit/strategies/base.py b/summit/strategies/base.py index b17e9f55..df81512d 100644 --- a/summit/strategies/base.py +++ b/summit/strategies/base.py @@ -527,10 +527,6 @@ class LogSpaceObjectives(Transform): >>> columns = [v.name for v in domain.variables] >>> values = {("temperature", "DATA"): 60,("flowrate_a", "DATA"): 0.5,("flowrate_b", "DATA"): 0.5,("yield_", "DATA"): 50,("de", "DATA"): 90} >>> previous_results = DataSet([values], columns=columns) - >>> # Multiobjective transform - >>> transform = LogSpaceObjectives(domain) - >>> strategy = SNOBFIT(domain, transform=transform) - >>> next_experiments = strategy.suggest_experiments(5, previous_results) """ diff --git a/summit/tests/test_strategies.py b/summit/tests/test_strategies.py index 8b7c3328..c27f377f 100644 --- a/summit/tests/test_strategies.py +++ b/summit/tests/test_strategies.py @@ -239,9 +239,6 @@ def reset(self): ("de", "DATA"): [90, 80], } previous_results = DataSet(values, columns=columns) - transform = LogSpaceObjectives(domain) - strategy = MockStrategy(domain, transform=transform) - strategy.suggest_experiments(5, previous_results) @pytest.mark.parametrize("num_experiments", [1, 2, 4])