Duplication of metric names with different model names as prefixes

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

Hey @jmseca, thanks for writing in! It seems this happens due to how TensorBoard logs are structured by stable-baselines3. When you say that you cannot compare two models directly, would it work to create a custom chart and plot all metrics that you’re interested in or adding extra metrics in the line plot?

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

Hi @jmseca , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!