--- id: nevergrad version: "1.0.12" license: MIT license_treatment: permissive maintenance: active --- # nevergrad — A Python toolbox for performing gradient-free optimization License: permissive · Maintenance: active · Downloads: 482.3K/mo ## 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 above — verify before relying. Nevergrad is a gradient-free optimization library that finds optimal parameter values for functions without requiring derivatives, supporting continuous, discrete, and mixed variable spaces. 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 pip install nevergrad uv add nevergrad poetry add nevergrad ## Installing nevergrad 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. 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) Requires Python 3.6 or later; numpy and other dependencies must be installed. 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_current - Install friction: low - Maintenance: active - Downloads: 482.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gradient-free optimization, black-box function optimization, hyperparameter tuning without gradients, derivative-free optimization, mixed variable optimization, evolutionary algorithms, parameter search, optimization, hyperparameter-tuning, black-box [View on SkillFed](https://skillfed.io/packages/nevergrad) · [View on PyPI](https://pypi.org/project/nevergrad/)