stable-baselines3
stable-baselines3 copied to clipboard
Verbosity Documentation
📚 Documentation
I have spent an entire afternoon staring into the dark voids of SB3's verbosity code (long story). Currently, the verbosity modes and what precisely they do is not documented in the website in any way. Presumably saying what 0 vs 1 vs 2 do without referring to source would be good, or more specifically how does info differ from debug. Even from just watching output this is not immediately obvious.
### Checklist
- [x] I have read the documentation (required)
- [x] I have checked that there is no similar issue in the repo (required)
Also I tried looking with grep for awhile and the only place where the debug mode is even used is here https://github.com/DLR-RM/stable-baselines3/blob/cdaa9ab418aec18f41c7e8e12e0ad28f238553eb/stable_baselines3/common/save_util.py#L269 unless I'm missing something?
Passing by, but IIRC, verbose=2
should print out bit more details than just things regarding saving, but this might be my brain remembering SB2 things or just making up things.
But yes, I agree the doc should detail further what would be logged and how.
Also I tried looking with grep for awhile and the only place where the debug mode is even used is here
in short:
-
verbose=0
: no output, when users want to have a clear stdout -
verbose=1
: info messages, "classic output", includes logger -
verbose>=2
: debug mode, mainly used for development/debug (hence very few places where it is currently used, as I remove such print when the debug is done) - Special case: we have additional output that can be displayed when loading a model by passing
print_system_info=True
to theload()
method
Current debug messages:
-
CheckpointCallback
will print a message everytime a checkpoint is saved (whenverbose=2
is passed to its constructor) - in
open_path_pathlib()
as you pointed out