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

Replace Candidate by a Parameter #459

Merged
merged 21 commits into from
Jan 29, 2020
Merged

Replace Candidate by a Parameter #459

merged 21 commits into from
Jan 29, 2020

Conversation

jrapin
Copy link
Contributor

@jrapin jrapin commented Jan 16, 2020

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

Candidate disappears and becomes a Parameter instead. This removes one layer in the code, and makes it simpler. All Parameter have still their value attribute, but were also added args and kwargs for backward compatibility and ease of use.

How Has This Been Tested (if it applies)

Checklist

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

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 16, 2020
@jrapin
Copy link
Contributor Author

jrapin commented Jan 17, 2020

This replaces #440

@jrapin jrapin changed the title [WIP] Candidate as parameter without offset [WIP] Replace Candidate by a Parameter Jan 17, 2020
@jrapin jrapin changed the base branch from variable_as_instrumentation to master January 17, 2020 16:57
@jrapin
Copy link
Contributor Author

jrapin commented Jan 17, 2020

Back to previous performance:

pytest 'nevergrad/optimization/test_optimizerlib.py::test_optimizers'
e3b2b95 -> 28.78s (218 tests)
candidate_param_option_b -> 31.35s (218 tests)
master (5bcd040 compatibility) -> 45.17s (218 tests)

@jrapin jrapin changed the title [WIP] Replace Candidate by a Parameter Replace Candidate by a Parameter Jan 20, 2020
@jrapin
Copy link
Contributor Author

jrapin commented Jan 20, 2020

This will be merged after releasing v0.3.1, and before v0.3.2

@jrapin
Copy link
Contributor Author

jrapin commented Jan 27, 2020

Closes #227 since Individual  can be straightforwardly replaced by Parameter

@jrapin jrapin merged commit f872add into master Jan 29, 2020
@jrapin jrapin deleted the candidate_param_option_b branch January 29, 2020 16:47
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. Difficulty: Medium Priority: Critical Status: Review needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants