ScheiklP / sofa_zoo

Reinforcement learning scripts for sofa_env environments.
MIT License
5 stars 5 forks source link

How to define success rate? #2

Closed wjyustl closed 6 months ago

wjyustl commented 6 months ago

I want to graph the "success rate" as you did with the number of "steps". But I don't know how to define the "success rate". Is it related to "'successful_task': True" in "model.ep_info_buffer" or "ep_successful_task_mean" in trajectory? Hope to get your reply.

ScheiklP commented 6 months ago

Hi @wjyustl , In SB3, the information of finished episodes is indeed stored in model.ep_info_buffer. Using SB3's wandb callback and the monitor wrapper, this data is automatically tracked and uploaded.

If you do not want to use wandb, you could also write a custom callback, similar to: https://github.com/ScheiklP/sofa_zoo/blob/main/sofa_zoo/common/callbacks.py#L7

Let me know, if that helps! :)

Cheers, Paul

wjyustl commented 6 months ago

Hi @wjyustl , In SB3, the information of finished episodes is indeed stored in model.ep_info_buffer. Using SB3's wandb callback and the monitor wrapper, this data is automatically tracked and uploaded.

If you do not want to use wandb, you could also write a custom callback, similar to: https://github.com/ScheiklP/sofa_zoo/blob/main/sofa_zoo/common/callbacks.py#L7

Let me know, if that helps! :)

Cheers, Paul

Hi @wjyustl , In SB3, the information of finished episodes is indeed stored in model.ep_info_buffer. Using SB3's wandb callback and the monitor wrapper, this data is automatically tracked and uploaded.

If you do not want to use wandb, you could also write a custom callback, similar to: https://github.com/ScheiklP/sofa_zoo/blob/main/sofa_zoo/common/callbacks.py#L7

Let me know, if that helps! :)

Cheers, Paul

That's very kind of you. Thank you very much. It helps me a lot as a beginner.