Skip to content

Commit

Permalink
Prepare release 2.6.1 (#578)
Browse files Browse the repository at this point in the history
* Bump version 2.6.1

* Add Nick Thompson as a contributor

* Move special tests under surrogate_models/tests

* Add Nicolas Gonel as a contributor

* Doc: add info about energy_weight and regularization_weight options for RMT[BC]

* Doc: improve build-the-doc section

* Update doc

* Bump egobox version
  • Loading branch information
relf authored May 28, 2024
1 parent 29ed4d1 commit 91798f0
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 30 deletions.
2 changes: 2 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ SMT has been developed thanks to contributions from:
* Laurent Wilkens
* Lucas Alber
* Mostafa Meliani
* Nick Thompson
* Nicolas Gonel
* Nina Moëllo
* Paul Saves
* Raul Carreira Rufato
Expand Down
9 changes: 5 additions & 4 deletions doc/_src_docs/dev_docs.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions doc/_src_docs/dev_docs.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ Install the test runner: ``pip install pytest`` then run: ``pytest``
Building the documentation
--------------------------

Users can read the docs online at ``smt.readthedocs.io``, but developers who contribute to the docs should build the docs locally to view the output.
Users can read the docs online at `smt.readthedocs.io <https://smt.readthedocs.io>`_, but developers who contribute to the docs should build the docs locally to view the output.
This is especially necessary because most of the docs in SMT contain code, code print output, and plots that are dynamically generated and embedded during the doc building process.
The docs are written using reStructuredText, and there are a few custom directives we have added for this embedding of dynamically-generated content.

First, install *sphinx_auto_embed* by running ``pip install git+https://github.com/hwangjt/sphinx_auto_embed.git``.
First, install the required dependencies to build the doc with: ``pip install -r doc/requirements.txt``

Then to generate the doc, the developer should go to the ``doc`` directory and run ``sphinx_auto_embed``, then ``make html``.

To build the docs, the developer should go to the ``doc`` directory and run ``sphinx_auto_embed`` and ``make html`` to build the html docs.
This is a 2-step process because ``sphinx_auto_embed`` converts rstx files to rst files and ``make html`` generates the html docs from the rst files.
The landing page for the built docs can then be found at ``doc/_build/html/index.html``, and this is the same page that readers first see when they load ``smt.readthedocs.io``.
The landing page for the built docs can then be found at ``doc/_build/html/index.html``.
40 changes: 23 additions & 17 deletions doc/_src_docs/surrogate_models/rmts.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions doc/_src_docs/surrogate_models/rmts.rstx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ and :math:`\alpha` and :math:`\beta` are regularization coefficients.

In problems with a large number of training points relative to the number of spline coefficients,
the energy minimization term is not necessary;
this term can be zero-ed by setting the reg_cons option to zero.
this term can be zero-ed by setting the ``energy_weight`` option to zero.
In problems with a small dataset, the energy minimization is necessary.
When the true function has high curvature, the energy minimization can be counterproductive
in the regions of high curvature.
Expand Down Expand Up @@ -85,7 +85,13 @@ The number of elements in each dimension is an option that trades off efficiency

In general, RMTB is the better choice when training time is the most important,
while RMTC is the better choice when accuracy of the interpolant is the most important.
More details of these methods are given in [1]_.

More details of these methods are given in [1]_.

Specially with regard to the implementation, the above functions to minimize are multiplied by :math:`\alpha`
which does not change the minimum result.
Then the ``energy_weight`` and ``regularization_weight`` controlling options used below are respectively defined
as :math:`\alpha'=\alpha` and :math:`\beta'=\alpha\beta`. See the section `3.5 - Summary and implementation` in [1]_ for further details.

.. [1] Hwang, J. T., & Martins, J. R. (2018). A fast-prediction surrogate model for large datasets. Aerospace Science and Technology, 75, 74-87.

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ pytest-cov # allows to get coverage report
ruff # format and lint code
ConfigSpace ~= 0.6.1
jenn >= 1.0.2, <2.0
egobox ~= 0.18.0
egobox ~= 0.19.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"cs": [ # pip install smt[cs]
"ConfigSpace~=0.6.1",
],
"gpx": ["egobox~=0.18"], # pip install smt[gpx]
"gpx": ["egobox~=0.19"], # pip install smt[gpx]
},
python_requires=">=3.8",
zip_safe=False,
Expand Down
2 changes: 1 addition & 1 deletion smt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.6.0"
__version__ = "2.6.1"
File renamed without changes.
File renamed without changes.

0 comments on commit 91798f0

Please sign in to comment.