Closed LemurPwned closed 4 years ago
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 messagesBesides, 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 :+1:
(Version 0.4.0 has already been released, :bird: now is wild and free? :stuck_out_tongue:)
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:
but besides, it is also
tqdm
that produces progress bars, hence I propose propagatingPrint.__quiet__
totqdm's
disable
parameter, for example:Thanks :) Keep up the good work!