[Question] About the logger
XiaobenLi00 opened this issue · 1 comments
XiaobenLi00 commented
❓ Question
In the doc https://stable-baselines3.readthedocs.io/en/master/common/logger.html, there is a warning
I am wondering that if I a custom logger object like
logger = configure(f'results_{job_data.env}')
model = PPO(job_data.policy, env, verbose=1,
tensorboard_log=f"wandb/{run.id}",
learning_rate=job_data.learning_rate,
batch_size=job_data.batch_size,
policy_kwargs=policy_kwargs,
gamma=job_data.gamma, **job_data.alg_hyper_params)
...
model.set_logger(logger)
model.learn(
total_timesteps=config["total_timesteps"],
callback=callback,
)
How should I set tensorboard_log
and verbose
? Because I notice that in the code below, the settings is overwritten and no info is logged.
Checklist
- I have checked that there is no similar issue in the repo
- I have read the documentation
- If code there is, it is minimal and working
- If code there is, it is formatted using the markdown code blocks for both code and stack traces.
araffin commented
why do you need a custom logger in your case? it seems that you just want to change the name, we have tb_log_name
parameter (to the learn()
method) for that.
Nothing is logged in your case because you didn't specify any logger format...
the built-in configure is here:
stable-baselines3/stable_baselines3/common/utils.py
Lines 181 to 215 in 9a3b28b