huggingface / huggingface_sb3

Additional code for Stable-baselines3 to load and upload models from the Hub.
74 stars 23 forks source link

Pyvirtualdisplay-HuggingFace hands-on LunarLander #42

Open HusseinEid101 opened 5 months ago

HusseinEid101 commented 5 months ago

I am trying to create a virtual display using VScode to complete my first hands-on exercise I published the model successfully but i cannot generate a video for the working model since pyvirtualdisplay doesn't work on windows I want to publish my model with the video all from VScode Can you help me with that?

Tianyuan-Zhang commented 3 months ago

Exception ignored in: <function VecVideoRecorder.del at 0x16f7bac00> Traceback (most recent call last): File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/stable_baselines3/common/vec_env/vec_video_recorder.py", line 113, in del self.close_video_recorder() File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/stable_baselines3/common/vec_env/vec_video_recorder.py", line 104, in close_video_recorder self.video_recorder.close() File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/gymnasium/wrappers/monitoring/video_recorder.py", line 157, in close clip.write_videofile(self.path, logger=moviepy_logger) File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/decorator.py", line 232, in fun for i, extra in enumerate(extras): ^^^^^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/decorators.py", line 54, in requires_duration return f(clip, *a, k) ^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/decorator.py", line 232, in fun for i, extra in enumerate(extras): ^^^^^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/decorators.py", line 135, in use_clip_fps_by_default return f(clip, *new_a, *new_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/decorator.py", line 232, in fun for i, extra in enumerate(extras): ^^^^^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB return f(clip, a, k) ^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/video/VideoClip.py", line 300, in write_videofile ffmpeg_write_video(self, filename, fps, codec, File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_writer.py", line 213, in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec = codec, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tzhang/.conda/envs/drl-course/lib/python3.12/site-packages/moviepy/video/io/ffmpeg_writer.py", line 88, in init '-r', '%.02f' % fps,


TypeError: must be real number, not NoneType
Moviepy - Building video /var/folders/nb/d0nh7dr54hzb08b53cqw2jwhndm2p0/T/tmpv1cow963/-step-0-to-step-1000.mp4.
Moviepy - Writing video /var/folders/nb/d0nh7dr54hzb08b53cqw2jwhndm2p0/T/tmpv1cow963/-step-0-to-step-1000.mp4

✘ must be real number, not NoneType
✘ We are unable to generate a replay of your agent, the package_to_hub
process continues
✘ Please open an issue at
https://github.com/huggingface/huggingface_sb3/issues
Moviepy - Building video /var/folders/nb/d0nh7dr54hzb08b53cqw2jwhndm2p0/T/tmpv1cow963/-step-0-to-step-1000.mp4.
Moviepy - Writing video /var/folders/nb/d0nh7dr54hzb08b53cqw2jwhndm2p0/T/tmpv1cow963/-step-0-to-step-1000.mp4