-
Notifications
You must be signed in to change notification settings - Fork 334
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
Prepare v.0.4.0 #223
Merged
Merged
Prepare v.0.4.0 #223
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reference: #198 Inheriting from a metaclass, rather than an object, grants us more flexibility and stronger typechecking for our abstract/base classes. It's also the more Pythonic option. I also added `@abs.abstractmethod` decorators for abstract methods. Signed-off-by: ljvmiranda921 <ljvmiranda@gmail.com>
Removed the `environments` module in favor of the `plotters` module. Signed-off by: ljvmiranda921 <ljvmiranda@gmail.com>
Resolves: #201 Added fmt: off and fmt: on commments to n-dimensional arrays in the test suite to prevent the ugly wrapping of arrays. Ran the black package to format the whole project.
Resolves #209 This commit adds a reporter module that implements a Reporter class. Its goal is to separate the concern of logging and printing from the optimizer classes. Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Resolves #228 Added a cost function decorator which allows the user to write a cost function that serves as a model for how the cost will be computed for every one particle. The decorator is tested with a pytest file where the shape and the equality with an example function is checked. I added a note to the documentation that some numpy functions will return arrays with single values in them.
This commit exposes the "limits" parameter in the README, and updates some undocumented parameters in the docstrings. Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit removes the if-else hierarchy in GeneralOptimizer by abstracting some parts of the topologies. Resolves #232 Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds a .coveragerc file to set-up the coverage requirements when running pytest. Related #245 Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds an isort configuration to ensure that isort works out of the box. Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit adds the `init_pos` argument in the Optimizer docstrings. Turns out that it's not documented in the high-level optimizers, so here we go. Related #251 Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
This commit removes the assert statement when verifying if the resulting cost actually has the desired shape. Moreover, additional tests were created to test this validator. Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Replaces compute_best_particle with compute_gbest. Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
Fixed a bug in the topologies where all the topologie would calculate the global best position instead of the best positions of the neighbourhoods. Fixed the VonNeumann tests as well as the optimizers such that they return the position with the best cost. I had to change the parameters for the optimization in the test_objective_func_with_kwargs to satisfy the conditions. Adjusted the code to fit the refactoring of the code. Especially in the topology tests where the sytax was wrong. Fixed the test by just checking if either the best or the second best position is inside of the matrix of the best positions... Fixed the error with the class passing by adding parenthesis which seem to have disappeared Cleaned up the PR and skipped the tests which require a very good cost as some topologies do not converge fast enough. Resolves #250
For modern python, let's support py35 above Signed-off-by: Lester James V. Miranda <ljvmiranda@gmail.com>
6fd11e4
to
77e3fcd
Compare
whzup
approved these changes
Jan 29, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still a long way to go, but just a tracker for v.0.4.0. Will be updating the description as we go along.
Need some help with the changelog! @whzup 👍
Changelog
Reporter
module - Add reporter module #227@cost
decorator which automatically scales to the whole swarm - Add cost function decorator #226Optimizers
- Refactor if-else hierarchy in GeneralOpt #232environments
module was removed - Remove environments module #217