diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 1e57289a7..ac017202b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] use-conda: [true, false] use-dist: [false] include: diff --git a/README.md b/README.md index d2eee76a8..d0a9a18aa 100644 --- a/README.md +++ b/README.md @@ -42,16 +42,15 @@ we refer to In: Proceedings of the conference on Learning and Intelligent OptimizatioN (LION 5) -SMAC v3 is written in Python3 and continuously tested with Python 3.6 and -python3.6. Its [Random Forest](https://github.com/automl/random_forest_run) -is written in C++. +SMAC v3 is written in Python3 and continuously tested with Python 3.7, 3.8 and 3.9. +Its [Random Forest](https://github.com/automl/random_forest_run) is written in C++. # Installation ## Requirements Besides the listed requirements (see `requirements.txt`), the random forest -used in SMAC3 requires SWIG (>= 3.0, <4.0) as a build dependency: +used in SMAC3 requires SWIG as a build dependency: ```apt-get install swig``` diff --git a/doc/index.rst b/doc/index.rst index 1775cd8d2..f6a1cc8a2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -55,7 +55,7 @@ Contents: | howpublished={\\url{https://github.com/automl/SMAC3}} | } -SMAC3 is mainly written in Python 3 and continuously tested with Python 3.6-3.8. +SMAC3 is mainly written in Python 3 and continuously tested with Python 3.7-3.9. Its `Random Forest `_ is written in C++11. diff --git a/setup.py b/setup.py index 2cf8ab301..be54b602f 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ def get_author(): setup( - python_requires=">=3.6", + python_requires=">=3.7", install_requires=requirements, extras_require=extras_require, package_data={'smac': ['requirements.txt', 'extras_require.json']}, diff --git a/smac/__init__.py b/smac/__init__.py index 248c8de1b..26ec80250 100644 --- a/smac/__init__.py +++ b/smac/__init__.py @@ -29,8 +29,8 @@ package_name = 'skopt' lazy_import.lazy_module(package_name) -if sys.version_info < (3, 6, 0): - raise ValueError("SMAC requires Python 3.6.0 or newer.") +if sys.version_info < (3, 7, 0): + raise ValueError("SMAC requires Python 3.7.0 or newer.") if os.name != 'posix': diff --git a/test/test_epm/test_rf_with_instances.py b/test/test_epm/test_rf_with_instances.py index 297535cfa..1f6094656 100644 --- a/test/test_epm/test_rf_with_instances.py +++ b/test/test_epm/test_rf_with_instances.py @@ -285,7 +285,10 @@ def test_rf_on_sklearn_data(self): model.train(X_train, y_train) y_hat, mu_hat = model.predict(X_test) mae = np.mean(np.abs(y_hat - y_test), dtype=np.float128) - self.assertAlmostEqual(mae, maes[i], msg=('Do log: %s, iteration %i' % (str(do_log), i))) + self.assertAlmostEqual(mae, maes[i], msg=('Do log: %s, iteration %i' % (str(do_log), i)), + # We observe a difference of around 0.00017 + # in github actions if doing log + places=3 if do_log else 7) def test_impute_inactive_hyperparameters(self): cs = smac.configspace.ConfigurationSpace() diff --git a/test/test_smbo/test_smbo.py b/test/test_smbo/test_smbo.py index 15b543d83..3c7513a4e 100644 --- a/test/test_smbo/test_smbo.py +++ b/test/test_smbo/test_smbo.py @@ -1,5 +1,4 @@ import shutil -import sys import time import unittest from unittest import mock @@ -278,7 +277,6 @@ def test_no_initial_design(self): smbo.start() self.assertEqual(smbo.initial_design_configs[0], smbo.scenario.cs.get_default_configuration()) - @unittest.skipIf(sys.version_info < (3, 6), 'distributed requires Python >=3.6') def test_ta_integration_to_smbo(self): """ In SMBO. 3 objects need to actively comunicate: diff --git a/test/test_tae/test_parallel_runner.py b/test/test_tae/test_parallel_runner.py index 35e52c33b..9074f76d2 100644 --- a/test/test_tae/test_parallel_runner.py +++ b/test/test_tae/test_parallel_runner.py @@ -1,5 +1,4 @@ import os -import sys import tempfile import time import unittest @@ -29,7 +28,6 @@ def target_delayed(x, seed, instance): return x ** 2, {'key': seed, 'instance': instance} -@unittest.skipIf(sys.version_info < (3, 6), 'distributed requires Python >=3.6') class TestDaskRunner(unittest.TestCase): def setUp(self):