rl-baselines3-zoo icon indicating copy to clipboard operation
rl-baselines3-zoo copied to clipboard

Some questions about Plotting

Open learningxiaobai opened this issue 3 years ago • 2 comments
trafficstars

❓ Question

Hello, I have some questions about plotting:

  1. How can I draw a graph with shaded parts? like this: 1668761603237 So I add a red line in plot_train.py: 4)VXNY%06TI(6BV2I(BAUSQ but the x coordinate looks wrong?
  2. How can I plot the evaluation success rate? python3 scripts/all_plots.py -a sac td3 tqc --env HalfCheetahBullet AntBullet -k success -f rl-trained-agents/ But I met the :KeyError: 'success is not a file in the archive' Thank you!

Checklist

  • [X] I have checked that there is no similar issue in the repo
  • [X] I have read the SB3 documentation
  • [X] I have read the RL Zoo README
  • [X] If code there is, it is minimal and working
  • [X] If code there is, it is formatted using the markdown code blocks for both code and stack traces.

learningxiaobai avatar Nov 18 '22 08:11 learningxiaobai

How can I draw a graph with shaded parts?

that's what all_plots.py and plot_from_file (I recommend using rliable, please read readme and blog post at least) should be able to it do for you.

If you wan to do it for the training reward, it is currently not possible, but I would happy to receive a PR that adds such script.

So I add a red line in plot_train.py:

not sure to follow what you did/added....

How can I plot the evaluation success rate? python3 scripts/all_plots.py -a sac td3 tqc --env HalfCheetahBullet AntBullet -k success -f rl-trained-agents/ But I met the :KeyError: 'success is not a file in the archive'

That's normal, success rate is only defined for some environments and the key is successes. For instance it is defined for the envs with HER replay buffer:

python3 scripts/all_plots.py -a tqc --env PandaReach-v1 -k successes -f rl-trained-agents/

The key is defined here: https://github.com/DLR-RM/stable-baselines3/blob/master/stable_baselines3/common/callbacks.py#L467

araffin avatar Nov 18 '22 09:11 araffin

Thanks a lot.

learningxiaobai avatar Nov 18 '22 11:11 learningxiaobai