From 9bda930856fc928ff6d6d3b1b9a28b226fba0bb9 Mon Sep 17 00:00:00 2001 From: Henri Pesonen Date: Mon, 11 Sep 2023 21:12:07 +0200 Subject: [PATCH 1/3] Fix another rtd bug (#468) * Fix yet another RTD bug causing code-blocks to disappear from html * Add requirement for newer version of Sphinx * Add requirement on ipython * Use python3.6 with rtd-build * Add extension for ipython-highlighting * Revert back to python3.5 on rtd-build * Modify mocked modules * Modify mocked modules list * Modify mocked modules list * Modify mocked modules list * Modify rtd conf.py * Bump python version in .readthedocs.yml * Fix RTD * Fixing rtd * Test whether mocking ordering has an effect * Test if the problem is sklearn.covariance * Test if the problem is sklearn.utils * modify mocked modules * modify mocked modules * remove sklearn.utils._testing.ignore_warnings * remove sklearn.utils._testing.ignore_warnings * Mock abc * Compile rtd with py38 * Remove unnecessary mocks * Experiment with mocks * Experiment with mocks * Experiment with mocks * Test mock instead of magicmock * Remove IPython.sphinxext.ipython_console_highlighting * Add extension sphinxext.ipython_console_highlighting * Require ipython!=8.7.0 * Test ipython3 -> python * Modify .readthedocs.yml * Modify quickstart.rst code-blocks * Pin ipython-version in requirements.txt * Fix a typo * Modify requirements-dev * Test code-block instead of code for indicating code blocks * Revert to old package-versions * Add nbsphinx into requirements * Pin docutils version * Pin docutils version * Pin pillow==5.4.1 * unpin package versions * Add nbsphinx in requirements * Require newer Sphinx * Update packages * Update packages * Update packages * Pin more versions * Remove ipython sphinx extension * Add more mocked packages * Test code vs code-block logic * Test code vs code-block logic * Test code vs code-block logic * Test code vs code-block logic * Change requirements.txt * Hail mary * Add pandoc in requirements * Modify quickstart.rst * Bring back old requirements.txt * Return to original * Add docs/requirements.txt file * Change all .. code:: to .. code-block:: * Remove quickstart.rst * Revert back to old format * Remove mocking of elfi * Remove mocking of elfi * Pin packages for docs * Remove pygments_style in conf.py * add autodoc-setup to conf.py * Hail mary v0.2 * Discard nbsphinx * remove import elfi from docs * remove import elfi from docs * Use python36 * modify requirements * Use python36 * Back to basic formulation with nbsphinx * Remove clutter from requirements.txt * Fix few bugs * Modify CHANGELOG * Update Pillow for docs * Update to Py38 for rtd * Downgrade to Py37 for rtd * install pygments[plugins] for rtd * unpin packages * unpin packages * Remove rtd packages * Mock toolz * Mock toolz * Mock toolz.functoolz * Upgrade to py39 and relax packages requirements * Back to py38 as py39 is not supported * Update sphinx * Remove doc requirements * Add nbspshinx and jupyter to requirements-dev * Modify readthedocs.yml to use build.os * Add python.path to readthedocs.yml * Correct typos on rtd config file * Try py3.10 in rtd.yml * Pin py3.8.6 * Update py and sphinx-requirements * Experiment with docs/conf.py * Activate sphinx_rtd_theme * Modidy docs/requirements.txt * Set sphinx_rtd_theme explicitly in conf.py * Modify configurations * Clean up conf files * Pin numpy==1.24.4 due to GPy * Change back to html_theme = default * Modify sphinx extensions for rtd * Update CHANGELOG.rst --- .readthedocs.yml | 9 +++++++-- CHANGELOG.rst | 3 +++ docs/conf.py | 2 +- docs/requirements.txt | 2 ++ requirements.txt | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1608c0e2..de24eabf 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,12 @@ # Required version: 2 +# Set the version of Python and other tools you might need +build: + os: "ubuntu-22.04" + tools: + python: "3.10" + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py @@ -19,6 +25,5 @@ formats: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 install: - - requirements: docs/requirements.txt \ No newline at end of file + - requirements: docs/requirements.txt diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8ce3f953..6731b278 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,9 @@ Changelog ========= +- Pin `numpy <= 1.24.0` due to `GPy` +- Update RTD configuration + 0.8.6 (2023-03-07) ------------------ - Fix broken 0.8.5 by adding missing `__init__.py` to elfi/methods/bsl/ diff --git a/docs/conf.py b/docs/conf.py index 1aca2ce1..28187189 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,7 +37,7 @@ def __getattr__(cls, name): ] sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) - html_theme = 'default' + html_theme = 'sphinx_rtd_theme' else: html_theme = 'sphinx_rtd_theme' diff --git a/docs/requirements.txt b/docs/requirements.txt index 815ecaaa..c355ede1 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,5 @@ # Documentation pygments[plugins] nbsphinx +sphinx==6.2.1 +sphinx-rtd-theme==1.2.2 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 7c914476..7ad4c640 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ dask[distributed]>=2.30.0 -numpy>=1.12.1 +numpy>=1.12.1, <= 1.24.4 scipy>=0.19 matplotlib>=1.1 GPy>=1.0.9 From 988e80970fd05347f39508aed725e9f61382f75a Mon Sep 17 00:00:00 2001 From: uremes Date: Mon, 11 Sep 2023 21:45:24 +0200 Subject: [PATCH 2/3] Update available methods (#469) * update available methods * update python version * update log --------- Co-authored-by: Henri Pesonen --- CHANGELOG.rst | 1 + README.md | 3 ++- docs/index.rst | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6731b278..c561908b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,7 @@ Changelog ========= +- Update available methods list - Pin `numpy <= 1.24.0` due to `GPy` - Update RTD configuration diff --git a/README.md b/README.md index 5351a8e9..0a7b8021 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Currently implemented LFI methods: - [Bayesian Optimization for Likelihood-Free Inference (BOLFI)](http://jmlr.csail.mit.edu/papers/v17/15-017.html) - [Robust Optimisation Monte Carlo (ROMC)](https://arxiv.org/abs/1904.00670) - [Bayesian Optimization for Likelihood-Free Inference by Ratio Estimation (BOLFIRE)](https://helda.helsinki.fi/handle/10138/305039) +- [Bayesian Synthetic Likelihood (BSL)](https://doi.org/10.1080/10618600.2017.1302882) Other notable included algorithms and methods: - Bayesian Optimization @@ -124,7 +125,7 @@ Resolving these may sometimes go wrong: - If you receive an error about `yaml.load`, install `pyyaml`. - On OS X with Anaconda virtual environment say `conda install python.app` and then use `pythonw` instead of `python`. -- Note that ELFI requires Python 3.6 or greater so try `pip3 install elfi`. +- Note that ELFI requires Python 3.7 or greater so try `pip3 install elfi`. - Make sure your Python installation meets the versions listed in `requirements.txt`. diff --git a/docs/index.rst b/docs/index.rst index 34c377b3..16214f70 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -27,11 +27,15 @@ Currently implemented LFI methods: - ABC-SMC sampler with `adaptive threshold selection`_ - Bayesian Optimization for Likelihood-Free Inference (BOLFI_) framework - Robust Optimization Monte Carlo (ROMC_) framework +- Bayesian Optimization for Likelihood-Free Inference by Ratio Estimation (BOLFIRE_) +- Bayesian Synthetic Likelihood (BSL_) .. _adaptive distance: https://projecteuclid.org/euclid.ba/1460641065 .. _adaptive threshold selection: https://projecteuclid.org/journals/bayesian-analysis/advance-publication/Adaptive-Approximate-Bayesian-Computation-Tolerance-Selection/10.1214/20-BA1211.full .. _BOLFI: http://jmlr.org/papers/v17/15-017.html .. _ROMC: http://proceedings.mlr.press/v108/ikonomov20a.html +.. _BOLFIRE: https://helda.helsinki.fi/handle/10138/305039 +.. _BSL: https://doi.org/10.1080/10618600.2017.1302882 ELFI also has the following non LFI methods: From c4f81bf02380897fb837925cfa7dd5e6189cd71e Mon Sep 17 00:00:00 2001 From: Henri Pesonen Date: Thu, 21 Sep 2023 11:42:14 +0200 Subject: [PATCH 3/3] Bump version (#470) --- CHANGELOG.rst | 2 ++ README.md | 2 +- elfi/__init__.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c561908b..4ab3dedc 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,8 @@ Changelog ========= +0.8.7 (2023-09-21) +------------------ - Update available methods list - Pin `numpy <= 1.24.0` due to `GPy` - Update RTD configuration diff --git a/README.md b/README.md index 0a7b8021..ef76c0a9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**Version 0.8.6 released!** See the [CHANGELOG](CHANGELOG.rst) and [notebooks](https://github.com/elfi-dev/notebooks). +**Version 0.8.7 released!** See the [CHANGELOG](CHANGELOG.rst) and [notebooks](https://github.com/elfi-dev/notebooks). diff --git a/elfi/__init__.py b/elfi/__init__.py index 233fe846..0e0a17b9 100644 --- a/elfi/__init__.py +++ b/elfi/__init__.py @@ -32,4 +32,4 @@ __email__ = 'elfi-support@hiit.fi' # make sure __version_ is on the last non-empty line (read by setup.py) -__version__ = '0.8.6' +__version__ = '0.8.7'