You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a few places Texar-PyTorch would print out information (e.g., "download complete", "pre-trained weights loaded") using the Python builtin print function. The behavior might not be desired and is not controllable (cannot be suppressed).
We could use the logging builtin library for this purpose. A couple of points to make sure are:
Provide a Texar interface to set logging levels, so even if we switch libraries old code would still work.
If users also use the logging library, their settings should not overwrite ours, and vice versa.
Certain outputs should be converted to exception messages, such as the following two examples:
Oh, one problem with using logging would be that it's probably not possible to log download progress in this way, because logging does not support clear lines. Also, there's a bug in the current download progress logging logic, so that small files will show a percentage greater than 100%.
In a few places Texar-PyTorch would print out information (e.g., "download complete", "pre-trained weights loaded") using the Python builtin
print
function. The behavior might not be desired and is not controllable (cannot be suppressed).We could use the
logging
builtin library for this purpose. A couple of points to make sure are:logging
library, their settings should not overwrite ours, and vice versa.Certain outputs should be converted to exception messages, such as the following two examples:
texar-pytorch/texar/torch/modules/pretrained/gpt2.py
Lines 308 to 310 in c6935c2
texar-pytorch/texar/torch/modules/pretrained/gpt2.py
Lines 185 to 189 in c6935c2
The text was updated successfully, but these errors were encountered: