unexpected keyword argument 'print_step'
See original GitHub issueDescribe the bug
when i play your demo: /example/train_neural_network. it shows:
2019-03-06 14:50:56,821 - pyswarms.single.global_best - INFO - Optimize for 1000 iters with {'c1': 0.5, 'c2': 0.3, 'w': 0.9}
pyswarms.single.global_best: 0%| |0/1000
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<timed exec> in <module>
~/Envs/huodian/lib/python3.7/site-packages/pyswarms/single/global_best.py in optimize(self, objective_func, iters, fast, **kwargs)
181 # Compute cost for current position and personal best
182 # fmt: off
--> 183 self.swarm.current_cost = objective_func(self.swarm.position, **kwargs)
184 self.swarm.pbest_pos, self.swarm.pbest_cost = compute_pbest(self.swarm)
185 # Set best_cost_yet_found for ftol
TypeError: f() got an unexpected keyword argument 'print_step'
Environment (please complete the following information):
- OS: [Linux]
- Version [manjaro 18]
- PySwarms Version [v1.0.2]
- Python Version [3.7.2]
Additional context None
Thank you!
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
python - Error: _print_LambertW() got an unexpected keyword ...
This error is no longer raised in the most recent version of SymPy (or at least the development version).
Read more >Error gurobipy "__init__() got an unexpected keyword ...
Hi, when i try to run the code in Spyder, this is what it gives me: I cannot understand the error since the...
Read more >Error "get_file_data() got an unexpected keyword argument ...
I have configured one input using the File-Meta Data input to monitor a log file. But I am getting below error in the...
Read more >scarico() got an unexpected keyword argument 'string'
First, I'm going to recommend you call your parameter something other than "string" (although that is a valid name). I will use "my_string"...
Read more >unexpected-keyword-arg / E1123 - Pylint 2.16.0-dev ...
Description: Used when a function call passes a keyword argument that doesn't correspond to one of the function's parameter names. Problematic code:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @olixu , welcome to PySwarms!
Thank you for raising this, we are already aware of the issue (see #264 ) and are currently working on updating them. Perhaps you could work on one, if you are interested?
Hopefully this is already solved. Closing this issue