stable-baselines3 icon indicating copy to clipboard operation
stable-baselines3 copied to clipboard

Verbosity Documentation

Open jkterry1 opened this issue 2 years ago • 3 comments

📚 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)

jkterry1 avatar Mar 05 '22 02:03 jkterry1

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?

jkterry1 avatar Mar 05 '22 02:03 jkterry1

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.

Miffyli avatar Mar 05 '22 23:03 Miffyli

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 the load() method

Current debug messages:

  • CheckpointCallback will print a message everytime a checkpoint is saved (when verbose=2 is passed to its constructor)
  • in open_path_pathlib() as you pointed out

araffin avatar Mar 12 '22 12:03 araffin