While using the package_to_hub function from huggingface_sb3, the process fails to generate a video replay of the agent due to the following error:
✘ 'DummyVecEnv' object has no attribute 'video_recorder'
✘ We are unable to generate a replay of your agent, the package_to_hub process continues
Steps to reproduce:
Train an agent with Stable-Baselines3 using DummyVecEnv
Call package_to_hub()
Observe error during video generation step
Expected behavior:
The function should either generate the video correctly or provide a clearer fallback when DummyVecEnv is used.
Environment:
Google Colab
huggingface_sb3 latest version
stable-baselines3
moviepy