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

Verbose option is missing (it is in documents) #340

Closed
msat59 opened this issue May 14, 2019 · 13 comments
Closed

Verbose option is missing (it is in documents) #340

msat59 opened this issue May 14, 2019 · 13 comments
Labels
documentation Documentation improvements or fixes

Comments

@msat59
Copy link
Contributor

msat59 commented May 14, 2019

Hi.

Please bring back the verbose option. I need to disable progress bar. I can disable it in the code; but it's better to have it as an option.

According to the documents, optimize should have the option; but both verbose and print_step have been removed.

optimizer.optimize(f, print_step=100, iters=1000, verbose=2)

Thanks.

@ljvmiranda921
Copy link
Owner

Yup, we’re fixing the docs now. Sorry for the confusion!

@msat59
Copy link
Contributor Author

msat59 commented May 14, 2019

Any plan to add it to the code? I've already added it to the local version.

if not verbose:
                self.rep.hook(best_cost=self.swarm.best_cost)

@ljvmiranda921
Copy link
Owner

As of now we’re planning to add it in the code, but I might release the new version this weekend. For now please use your local changes and maybe open up a PR. Sorry I haven’t been on top of Issues, work got reallyy busyy

@ljvmiranda921
Copy link
Owner

Hi documentation is now updated! Will be closing this issue now 👍

@ljvmiranda921 ljvmiranda921 added the documentation Documentation improvements or fixes label May 18, 2019
@masadcv
Copy link

masadcv commented Feb 29, 2020

Any plan to add it to the code? I've already added it to the local version.

if not verbose:
                self.rep.hook(best_cost=self.swarm.best_cost)

Where are you making these changes? I also need to turn off verbose option as it is constantly printing messages I dont want to see. To me this is quite essential option to have.

@ljvmiranda921
Copy link
Owner

Hi @devkicks , we haven't added it up in the codebase and just updated the documentation. Would you be able to help out in creating a PR for this?

@ljvmiranda921 ljvmiranda921 reopened this Mar 1, 2020
@whzup
Copy link
Collaborator

whzup commented Mar 28, 2020

@ljvmiranda921 I think we can easily implement this feature, though. We just add a verbose argument to the optimize method and then choose the iterator of the loop (because this generates the progress bar) and the local logging level. Do you think this works?

@ljvmiranda921
Copy link
Owner

^Hi @whzup sorry I wasn't able to reply properly, ok I think that works!

@nishnash54
Copy link
Contributor

Adding the full verbose option would be great when running optimizations with fewer iterations. For a large number of iterations, the print_step parameter makes a lot of sense.
Currently you are using a logger for the results. May I suggest you have something like a tabular format that makes it easier to read, maybe something like gplearn. Here's an example of the verbose.

@msat59
Copy link
Contributor Author

msat59 commented Apr 24, 2020

Any plan to add it to the code? I've already added it to the local version.

if not verbose:
                self.rep.hook(best_cost=self.swarm.best_cost)

Where are you making these changes? I also need to turn off verbose option as it is constantly printing messages I dont want to see. To me this is quite essential option to have.

There are three places:

pyswarms\single\global_best.py
pyswarms\single\general_optimizer.py
pyswarms\discrete\binary.py

search for self.rep.hook(best_cost=self.swarm.best_cost) and add that condition. In addition, you should add verbose=False in function declaration. I can change the code if it's required.

@ljvmiranda921
Copy link
Owner

Hi @msat59 @nishnash54 sorry I don't have the bandwidth to do new updates. If you can open a PR on this that would be great! Let's do @msat59 's version first, then maybe work on @nishnash54 's suggestion.

@msat59
Copy link
Contributor Author

msat59 commented Apr 24, 2020

Hi @msat59 @nishnash54 sorry I don't have the bandwidth to do new updates. If you can open a PR on this that would be great! Let's do @msat59 's version first, then maybe work on @nishnash54 's suggestion.

I rechecked my fix now, after a year. It's not completely verbose. I will check it tomorrow morning.

@msat59
Copy link
Contributor Author

msat59 commented Apr 24, 2020

I finally fixed the verbosity; I'll update the codes when I found out how to do it. (I'm new on Github)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation improvements or fixes
Projects
None yet
Development

No branches or pull requests

5 participants