nevergrad
A Python toolbox for performing gradient-free optimization
Decision gist · record as of 2026-08-14
Yes. Nevergrad is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It's well-suited if you need gradient-free optimization with support for mixed variable types. Install it if you're doing hyperparameter tuning, black-box optimization, or algorithm configuration without access to gradients.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; numpy and other dependencies must be installed.
- Low install friction; pure Python wheel with six runtime dependencies (numpy, cma, bayesian-optimization, typing-extensions, pandas, directsearch).
- Repository is active with recent commits and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute nevergrad with minimal restrictions in commercial and open-source projects.
last release 2025-04-23 (478 days) · last repo commit 2026-07-24 · 4,201 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 482,272 downloads/mo, #6,423 on PyPI
Alternatives
Verify before relying
pip install nevergrad
import nevergrad as ng
def square(x):
return sum((x - .5)**2)
optimizer = ng.optimizers.NGOpt(parametrization=2, budget=100)
recommendation = optimizer.minimize(square)
print(recommendation.value)- Whether the library scales well to high-dimensional optimization problems or very large budgets.
- Performance comparison with other gradient-free optimizers on standard benchmarks.
- Specific convergence guarantees or theoretical properties of the NGOpt algorithm.
What it is and what it does
Nevergrad is a Python optimization library designed for problems where gradients are unavailable or expensive to compute. It implements multiple gradient-free algorithms (including evolutionary strategies, Bayesian optimization, and CMA-ES variants) and lets you specify complex search spaces with bounded continuous variables, discrete choices, and mixtures of both through its Instrumentation API. You define a function to minimize, describe the parameter space, set a budget, and the optimizer explores and returns the best point found.
The library is maintained by Facebook Research and actively developed. It's commonly used for hyperparameter tuning in machine learning, algorithm configuration, and any black-box optimization task where you can evaluate a function but cannot compute gradients. Dependencies include numpy for numerics, cma for covariance-matrix adaptation, and bayesian-optimization for probabilistic search strategies.
Use it for
- Tuning hyperparameters (learning rate, batch size, architecture choice) for neural networks without access to gradient information.
- Optimizing simulator or expensive-to-evaluate function outputs where finite differences are impractical.
- Finding optimal configurations for complex systems with mixed continuous and categorical parameters.
- Benchmarking and comparing multiple gradient-free algorithms on the same optimization problem.
- Automating parameter search for legacy code or proprietary black-box functions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Nevergrad is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It's well-suited if you need gradient-free optimization with support for mixed variable types. Install it if you're doing hyperparameter tuning, black-box optimization, or algorithm configuration without access to gradients.
Install
nevergrad on PyPI
Before you install
Low install friction; pure Python wheel with six runtime dependencies (numpy, cma, bayesian-optimization, typing-extensions, pandas, directsearch). Repository is active with recent commits and no known vulnerabilities.
Requires Python 3.6 or later; numpy and other dependencies must be installed.
License in practice
MIT license is permissive; you can use, modify, and distribute nevergrad with minimal restrictions in commercial and open-source projects.
Quickstart
pip install nevergrad
import nevergrad as ng
def square(x):
return sum((x - .5)**2)
optimizer = ng.optimizers.NGOpt(parametrization=2, budget=100)
recommendation = optimizer.minimize(square)
print(recommendation.value)
Verify before relying
- Whether the library scales well to high-dimensional optimization problems or very large budgets.
- Performance comparison with other gradient-free optimizers on standard benchmarks.
- Specific convergence guarantees or theoretical properties of the NGOpt algorithm.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesnumpycmabayesian-optimizationtyping-extensionspandasdirectsearch |
| Maintenance | Actively maintained 478 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 482,272 / month, #6,423 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonTopic :: Scientific/Engineering |
Evidence: nevergrad-1.0.12-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gradient-free optimization”
- nevergradNevergrad is a gradient-free optimization library that finds optimal…
- directsearchSolves unconstrained and linearly constrained nonlinear minimization…
- pyswarmsPySwarms implements particle swarm optimization (PSO) algorithms in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also torch-optimizer · directsearch · cmaes · scikit-optimize · onnxoptimizer · ropt-dakota · deap · optax · recbole · cma