question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unexpected keyword argument 'print_step'

See original GitHub issue

Describe 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:closed
  • Created 5 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
stevenbwcommented, Mar 6, 2019

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?

0reactions
ljvmiranda921commented, May 1, 2019

Hopefully this is already solved. Closing this issue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found