-
Notifications
You must be signed in to change notification settings - Fork 333
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
Updated sample code to new API #296
Conversation
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.
Hi @ndngo ! Thank you for your contribution!
Some small updates from you before we merge your branch:
- I think it would be better to remove the Dependencies section. Since we have
requirements.txt
, there's no need for that anymore - The way we represent the output as seen in the README:
>>> 2017-10-03 10:12:33,859 - pyswarms.single.global_best - INFO - Iteration 1/100, cost: 0.131244226714
>>> 2017-10-03 10:12:33,878 - pyswarms.single.global_best - INFO - Iteration 26/100, cost: 1.60297958653e-05
>>> 2017-10-03 10:12:33,893 - pyswarms.single.global_best - INFO - Iteration 51/100, cost: 1.60297958653e-05
>>> 2017-10-03 10:12:33,906 - pyswarms.single.global_best - INFO - Iteration 76/100, cost: 2.12638727702e-06
>>> 2017-10-03 10:12:33,921 - pyswarms.single.global_best - INFO - ================================
Optimization finished!
Final cost: 0.0000
Best value: [-0.0003521098028145481, -0.00045459382339127453]
Is now outdated. Currently we have a progress bar showing up. I'm wondering how we can show that. Maybe a GIF using ASCIInema might help?
@ljvmiranda921 I've removed the dependencies section and added a gif showing the progress bar. |
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.
Note to self before merging: ensure that contributor’s list is updated
Merged! Thank you for your contribution @ndngo ! |
@all-contributors please add @ndngo for documentation |
I've put up a pull request to add @ndngo! 🎉 |
Woops another one, @all-contributors please add @ndngo for documentation |
I've put up a pull request to add @ndngo! 🎉 |
Does pyswam do multiobjective? Would love to see a user-defined multiobective problem, say 2 and then 3 variables |
Description
Updated sample code in the README to work with the new API
Related Issue
#287
Motivation and Context
The API changed so the code samples in the README needed to be updated to conform to the new API.
How Has This Been Tested?
The code samples were tested by running the code and ensuring that the results are similar to the expected results before the API change. The testing environment was Python 3 on Windows Subsystem for Linux. Each code sample was executed and the output was compared to expected output shown in the README.
Screenshots (if appropriate):
Swarm visualization
Types of changes
Checklist: