vwxyzjn / cleanrl

High-quality single file implementation of Deep Reinforcement Learning algorithms with research-friendly features (PPO, DQN, C51, DDPG, TD3, SAC, PPG)
http://docs.cleanrl.dev
Other
4.91k stars 566 forks source link

Video upload Issue - wandb #397

Closed tbasaklar closed 7 months ago

tbasaklar commented 1 year ago

Hi,

I was following the "Experiment Tracking" at https://docs.cleanrl.dev/get-started/experiment-tracking/

In this example, the captured videos are also uploaded to wandb. However, although I followed the exact same command, my wandb project missed the "Media" folder in "Files", hence the videos do not show up in the browser. What could be the issue here? Could you try to rerun the command in the docs page of cleanRL and see if the videos are uploaded on your side?

Thanks,

vwxyzjn commented 1 year ago

You can probably do this https://github.com/vwxyzjn/cleanrl/blob/b558b2b48326d8bb8da7fa853914576ae4610f53/cleanrl/ppo_continuous_action.py#L325

there are some ongoing gymnasium migration stuff that might have broken the Wandb gym integration.

tbasaklar commented 1 year ago

I've also realized that if I change the command from:

python cleanrl/ppo.py --seed 1 --env-id CartPole-v1 --track --capture-video

to

python cleanrl/dqn.py --seed 1 --env-id CartPole-v1 --track --capture-video

It works! I wondered why that happened and realized it was because of the gymnasium migration, as you mentioned. For dqn.py, the migration to the gymnasium is completed, I guess, and that's why it works.

I've also added the following condition (in ppo_continuous_action.py) to ppo.py. It works now!

Thanks,

tbasaklar commented 1 year ago

Hi,

I appreciate the work, and I really love to work with cleanRL, especially for research purposes. When do you think you can complete the gymnasium migration for all algorithms? It is hard to follow the examples when they give errors related to Gymnasium and Gym discrepancies.

Best,

vwxyzjn commented 7 months ago

424 should have completed the migration for almost all.