[Bug] _init_callback in base_class does not handle verbose parameter when creating EvalCallback #1006
Closed
3 tasks done
Labels
bug
Something isn't working
🐛 Bug
Hi,
I just noticed that in the
_init_callback
method, the verbose parameter is not used when creatingEvalCallback
. Since the default verbose value is 1 in the EvalCallback, logging could not be disabled when only using the default verbose value.Code reference:
stable-baselines3/stable_baselines3/common/base_class.py
Lines 389 to 396 in c4f54fc
stable-baselines3/stable_baselines3/common/callbacks.py
Line 307 in c4f54fc
To Reproduce
I would like to set verbose=0 in my studies, and therefore, when I enable evaluation, I cannot decide whether to print the evaluation results or not.
Below, you can see my example code:
Expected behavior
I think this problem could be solved easily by passing the
self.verbose
variable into the EvalCalback constructor.I can volunteer for this PR.
System Info
({'OS': 'Linux-5.13.0-40-generic-x86_64-with-glibc2.17 #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022', 'Python': '3.8.13', 'Stable-Baselines3': '1.6.1a0', 'PyTorch': '1.11.0', 'GPU Enabled': 'True', 'Numpy': '1.22.3', 'Gym': '0.25.0'}, 'OS: Linux-5.13.0-40-generic-x86_64-with-glibc2.17 #45~20.04.1-Ubuntu SMP Mon Apr 4 09:38:31 UTC 2022\nPython: 3.8.13\nStable-Baselines3: 1.6.1a0\nPyTorch: 1.11.0\nGPU Enabled: True\nNumpy: 1.22.3\nGym: 0.25.0\n')
Checklist
The text was updated successfully, but these errors were encountered: