Hello,
I am new to Wandb and decided to use it in an existing Git repo: PantheonRL.
This Git repo uses stable-baseline3 and has Tensorboard logging.
I am trying to upload my tensorboard logs to Wandb, while training, but since Tensorboard Logs are:
path/to/log/model_name/events.out.tfevents.....
When I sync tensorboard with wandb, I get charts with the name:
model_name/rollout/ep_rew_mean
Instead of
rollout/ep_rew_mean
The downside is that I cannot compare two models directly in the same graph.
What can be done to fix this?
I have already found something that fixes this, by logging the tensorboard logs directly to the path/to/log
, but this way, tensorboard does not know which model are the logs from.
Below I paste my code:
from stable_baselines3 import PPO
from wandb.integration.sb3 import WandbCallback
import wandb
(...)
ego = PPO(policy='MlpPolicy')
(...)
wandb.tensorboard.patch(root_logdir=f"logs",pytorch=True)
run = wandb.init(
id='id123',
project="project_name",
sync_tensorboard=True, # auto-upload sb3's tensorboard metrics
monitor_gym=False, # auto-upload the videos of agents playing the game
save_code=False,
)
(...)
ego.learn(
callback = WandbCallback(
gradient_save_freq=500,
model_save_path=f"models/{run.id}",
)
)
Thank you in advance