facebookresearch / nevergrad

A Python toolbox for performing gradient-free optimization
https://facebookresearch.github.io/nevergrad/
MIT License
3.9k stars 350 forks source link

Incorrect code blocks in doc #1503

Open londumas opened 1 year ago

londumas commented 1 year ago

In section "Optimization with constraints" of the documentation, some code blocks are not rendered properly.

https://facebookresearch.github.io/nevergrad/optimization.html#optimization-with-constraints

""" Then, if you want to work with the ask/tell form, instead of .. code-block:: python

optimizer.tell(candidate, value)

you can do .. code-block:: python

optimizer.tell(candidate, value, [constraint_violation1, constraint_violation2, constraint_violation3])

Or, if you work with minimize, you can also replace .. code-block:: python

optimizer.minimize(loss_function)

by .. code-block:: python

optimizer.minimize(loss_function, constraint_violations)

where constraint_violations maps a candidate to a vector of constraint violations. """