
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
A flexible derivative-free solver for (bound constrained) general objective minimization
.. image:: https://github.com/numericalalgorithmsgroup/pybobyqa/actions/workflows/python_testing.yml/badge.svg :target: https://github.com/numericalalgorithmsgroup/pybobyqa/actions :alt: Build Status
.. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg :target: https://www.gnu.org/licenses/gpl-3.0 :alt: GNU GPL v3 License
.. image:: https://img.shields.io/pypi/v/Py-BOBYQA.svg :target: https://pypi.python.org/pypi/Py-BOBYQA :alt: Latest PyPI version
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2630437.svg :target: https://doi.org/10.5281/zenodo.2630437 :alt: DOI:10.5281/zenodo.2630437
.. image:: https://static.pepy.tech/personalized-badge/py-bobyqa?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads :target: https://pepy.tech/project/py-bobyqa :alt: Total downloads
Py-BOBYQA is a flexible package for solving bound-constrained general objective minimization, without requiring derivatives of the objective. At its core, it is a Python implementation of the BOBYQA algorithm by Powell, but Py-BOBYQA has extra features improving its performance on some problems (see the papers below for details). Py-BOBYQA is particularly useful when evaluations of the objective function are expensive and/or noisy.
More details about Py-BOBYQA and its enhancements over BOBYQA can be found in our papers:
Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers <https://doi.org/10.1145/3338517>
, ACM Transactions on Mathematical Software, 45:3 (2019), pp. 32:1-32:41 [arXiv preprint: 1804.00154 <https://arxiv.org/abs/1804.00154>
]Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>
, Optimization, 71:8 (2022), pp. 2343-2373. [arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>
]Model Construction for Convex-Constrained Derivative-Free Optimization <https://arxiv.org/abs/2403.14960>
_, arXiv preprint arXiv:2403.14960 (2024).Please cite [1] when using Py-BOBYQA for local optimization, [1,2] when using Py-BOBYQA's global optimization heuristic functionality, and [1,3] if using the general convex constraints functionality.
The original paper by Powell is: M. J. D. Powell, The BOBYQA algorithm for bound constrained optimization without derivatives, technical report DAMTP 2009/NA06, University of Cambridge (2009), and the original Fortran implementation is available here <http://mat.uc.pt/~zhang/software.html>
_.
If you are interested in solving least-squares minimization problems, you may wish to try DFO-LS <https://github.com/numericalalgorithmsgroup/dfols>
_, which has the same features as Py-BOBYQA (plus some more), and exploits the least-squares problem structure, so performs better on such problems.
See manual.pdf or the online manual <https://numericalalgorithmsgroup.github.io/pybobyqa/>
_.
Full details of the Py-BOBYQA algorithm are given in our papers:
Improving the Flexibility and Robustness of Model-Based Derivative-Free Optimization Solvers <https://doi.org/10.1145/3338517>
, ACM Transactions on Mathematical Software, 45:3 (2019), pp. 32:1-32:41 [preprint <https://arxiv.org/abs/1804.00154>
]Escaping local minima with derivative-free methods: a numerical investigation <https://doi.org/10.1080/02331934.2021.1883015>
, Optimization, 71:8 (2022), pp. 2343-2373. [arXiv preprint: 1812.11343 <https://arxiv.org/abs/1812.11343>
]Model Construction for Convex-Constrained Derivative-Free Optimization <https://arxiv.org/abs/2403.14960>
_, arXiv preprint arXiv:2403.14960 (2024).Please cite [1] when using Py-BOBYQA for local optimization, [1,2] when using Py-BOBYQA's global optimization heuristic functionality, and [1,3] if using the general convex constraints functionality.
Py-BOBYQA requires the following software to be installed:
Additionally, the following python packages should be installed (these will be installed automatically if using pip, see Installation using pip
_):
Optional package: Py-BOBYQA versions 1.2 and higher also support the trustregion <https://github.com/lindonroberts/trust-region>
_ package for fast trust-region subproblem solutions. To install this, make sure you have a Fortran compiler (e.g. gfortran <https://gcc.gnu.org/wiki/GFortran>
_) and NumPy installed, then run :code:pip install trustregion
. You do not have to have trustregion installed for Py-BOBYQA to work, and it is not installed by default.
For easy installation, use pip <http://www.pip-installer.org/>
_:
.. code-block:: bash
$ pip install Py-BOBYQA
Note that if an older install of Py-BOBYQA is present on your system you can use:
.. code-block:: bash
$ pip install --upgrade Py-BOBYQA
to upgrade Py-BOBYQA to the latest version.
Alternatively, you can download the source code from Github <https://github.com/numericalalgorithmsgroup/pybobyqa>
_ and unpack as follows:
.. code-block:: bash
$ git clone https://github.com/numericalalgorithmsgroup/pybobyqa
$ cd pybobyqa
Py-BOBYQA is written in pure Python and requires no compilation. It can be installed using:
.. code-block:: bash
$ pip install .
instead.
To upgrade Py-BOBYQA to the latest version, navigate to the top-level directory (i.e. the one containing :code:setup.py
) and rerun the installation using :code:pip
, as above:
.. code-block:: bash
$ git pull
$ pip install .
If you installed Py-BOBYQA manually, you can test your installation using the pytest package:
.. code-block:: bash
$ pip install pytest
$ python -m pytest --pyargs pybobyqa
Alternatively, the HTML documentation provides some simple examples of how to run Py-BOBYQA.
Examples of how to run Py-BOBYQA are given in the online documentation <https://numericalalgorithmsgroup.github.io/pybobyqa/>
, and the examples directory <https://github.com/numericalalgorithmsgroup/pybobyqa/tree/master/examples>
in Github.
If Py-BOBYQA was installed using pip you can uninstall as follows:
.. code-block:: bash
$ pip uninstall Py-BOBYQA
If Py-BOBYQA was installed manually you have to remove the installed files by hand (located in your python site-packages directory).
Please report any bugs using GitHub's issue tracker.
This algorithm is released under the GNU GPL license. Please contact NAG <http://www.nag.com/content/worldwide-contact-information>
_ for alternative licensing.
FAQs
A flexible derivative-free solver for (bound constrained) general objective minimization
We found that Py-BOBYQA demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.