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

Substantial print pollution when optimising for hyperpameters #1

Closed
LemurPwned opened this issue Feb 9, 2020 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@LemurPwned
Copy link

Hello,
while I was trying to optimise for hyperparameters I have found that there is little I could do to avoid having a large printout to stdout.

I tried to mute this by doing the following:

import pyss3
pyss3.Print.set_quiet(True)

but besides, it is also tqdm that produces progress bars, hence I propose propagating
Print.__quiet__ to tqdm's disable parameter, for example:

tqdm(..., disable=Print.__quiet__)

Thanks :)
Keep up the good work!

@sergioburdisso sergioburdisso added the enhancement New feature or request label Feb 11, 2020
@sergioburdisso sergioburdisso self-assigned this Feb 11, 2020
@sergioburdisso
Copy link
Owner

sergioburdisso commented Feb 11, 2020

Hi @LemurPwned!
Again, thanks for the valuable feedback, taking into account your suggestions I've completely redesigned the way in which PySS3 handles verbosity levels. Below I'll paste the message of the commit (216be41) that solved this issue:


In response to Issue #1, the way in which PySS3 handled the level of
verbosity was redesigned in order to give the user greater control
through a clearer interface.
Now PySS3 supports the following 3 levels of verbosity:

  • 0 (quiet): do not output any message (only error messages)
  • 1 (normal): default behavior, display only warning messages and
    progress bars [*]
  • 2 (verbose): display also informative non-essential messages

Besides, now the following built-in constants can also be used to refer
to these 3 values: VERBOSITY.QUIET, VERBOSITY.NORMAL, and
VERBOSITY.VERBOSE, respectively.
In addition, a set_verbosity function has been added to the main
module, for the user to change the verbosity level.
For example, let's suppose we want to set the verbosity level to
'quiet', then we could use:

import pyss3
...
pyss3.set_verbosity(0)
...

or, equivalently:

import pyss3
from pyss3 import VERBOSITY
...
pyss3.set_verbosity(VERBOSITY.QUIET)
...

To carry out this update, the Print class was partially redesigned,
and therefore, as it can be seen, the source code of all the modules
had to be modified as well (to be compatible with the new Print
design).

[*] Note that, unlike before, PySS3 will now, by default, only show
progress bars (plus warning or error messages).


I think that this new interface is much clearer and the user can use it without "being aware" of what's "under the hood" (that is, the "Print" class), which I think is great.

Anyway, I was working on a new version release (0.4.0) when I read your issue, so I decided to pospone its release and add this modification to the new version. This new release will improve and incorporate new features, such as an explicit support for multi-label classification and a method for the user to automatically extract "useful insights" (relevant text fragments) from documents, I'll release this new version today, so you'll be able to update your code after updating the package (I'll notify you as soon as it is released).

:D

Thank you very much for your useful ideas and feedback, buddy 👍

@sergioburdisso
Copy link
Owner

(Version 0.4.0 has already been released, 🐦 now is wild and free? 😛)

@sergioburdisso sergioburdisso removed their assignment Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants