Skip to content

Conversation

gauravmanmode
Copy link
Collaborator

PR Description

This PR updates the documentation of the recently added optimizers from the nevergrad library to follow the new documentation style.

Additional changes

Clarify dependancy conflict between nevergrad and bayes_opt
Closes #627
Use tab-set directive instead of tabbed
Closes #628
Also, use from __future__ import annotations in nevergrad_optimizers.py for stringified annotations.

@janosg
Copy link
Member

janosg commented Aug 27, 2025

@gauravmanmode can you update this branch and fix the merge conflicts?

@gauravmanmode
Copy link
Collaborator Author

gauravmanmode commented Aug 27, 2025

Sure, I have a few things left to do here and then I will fix the merge conflicts

@gauravmanmode gauravmanmode marked this pull request as ready for review August 28, 2025 08:59
Copy link

codecov bot commented Aug 28, 2025

Codecov Report

❌ Patch coverage is 99.41860% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/optimagic/optimizers/nevergrad_optimizers.py 99.26% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/optimagic/algorithms.py 88.18% <100.00%> (ø)
src/optimagic/config.py 100.00% <100.00%> (ø)
src/optimagic/optimizers/bayesian_optimizer.py 91.59% <100.00%> (ø)
src/optimagic/optimizers/nevergrad_optimizers.py 77.08% <99.26%> (+10.52%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gauravmanmode
Copy link
Collaborator Author

@janosg, I have fixed the merge conflicts.

Copy link
Member

@janosg janosg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Just minor comments.

@gauravmanmode
Copy link
Collaborator Author

For documenting several optimizers in here.
I am thinking of having an enum Portfolio so that choice can be made in autocomplete where description is visible for each.
Could be used as always

import optimagic as om
om.minimize(
    ...
    algorithm=om.algos.nevergrad_portfolio(optimizer="Carola2")
)

or another way

import optimagic as om
 from optimagic.optimizers.nevergrad_optimizers import Portfolio
om.minimize(
    ...
    algorithm=om.algos.nevergrad_portfolio(optimizer=Portfolio.Carola2)
)

which would look like this
Should I proceed with this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants