agi-brain / xuance

XuanCe: A Comprehensive and Unified Deep Reinforcement Learning Library
https://xuance.readthedocs.io/
MIT License
637 stars 103 forks source link

how to record other information by tensorboard in xuance #60

Open muyu11 opened 2 weeks ago

muyu11 commented 2 weeks ago

I'm training a customize mappo environment, now I can visualize the rewards during my training, but I wanna record other information in a dict "self.infos" and can be visualized in tensorboard, self.infos will be returned in the method "step", so how can I realize that?

Thanks

wenzhangliu commented 1 day ago

To record additional information returned in the step() method, you can edit on_policy_marl.py by adding the following line after line 427 (version 1.2.3):

step_info["Train-Results/Other-Info"] = {"env-%d" % i: info[i]["Other-Info"]}

This will allow you to capture and log the desired information.