Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arity bug #1397

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Fix arity bug #1397

merged 2 commits into from
Mar 22, 2022

Conversation

teytaud
Copy link
Contributor

@teytaud teytaud commented Mar 21, 2022

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue

@mathuvu found a bug.

How Has This Been Tested (if it applies)

import nevergrad as ng
from nevergrad.optimization import optimizerlib
arg = ng.p.TransitionChoice([0, 1], repetitions=5)
optim = optimizerlib._OnePlusOne(parametrization=arg, budget=6500, num_workers=1)
print(optim.arity_for_discrete_mutation)
optim = optimizerlib._OnePlusOne(parametrization=7, budget=6500, num_workers=1)
print(optim.arity_for_discrete_mutation)

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CLA).
  • All tests passed, and additional code has been covered with new tests.

@teytaud teytaud requested review from jrapin and mathuvu March 21, 2022 07:30
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Mar 21, 2022
Copy link
Contributor

@jrapin jrapin left a comment

Choose a reason for hiding this comment

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

simpler syntax

nevergrad/optimization/optimizerlib.py Outdated Show resolved Hide resolved
@jrapin jrapin changed the title fix bug 500 Fix arity bug Mar 21, 2022
Co-authored-by: Jérémy Rapin <jrapin.github@gmail.com>
@teytaud teytaud merged commit 686f9a2 into main Mar 22, 2022
@teytaud teytaud deleted the bug500 branch March 22, 2022 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants