We update the tutorial so that it is in line with the new tutorial structure in #291. We also expand the features demonstrated in this tutorial.
Depends on #291 and #295
moviepy woes
Update: It turns out this was all due to the decorator module not being loaded properly; see https://github.com/Zulko/moviepy/issues/1625 -- we just have to reload decorator so that moviepy imports it correctly.
One notable issue was that the tutorial needed ffmpeg to be installed in order to generate videos; this happens because the new Gymansium depends on moviepy for video recording, which in turn depends on ffmpeg. This is not a problem for Colab users as ffmpeg is already installed there, but local users may encounter frustration -- the video generation happens after the run, so they may do the run, wait for 2 hours, and then see that the videos fail. The steps that fail are as follows:
Create a Conda environment with Python 3.7 and activate it.
Install the package with pip install -e .[visualize]
Install jupyterlab with pip install jupyterlab
Start jupyterlab and run the notebook.
Leads to error on first display_video line with message looking like:
86 '-s', '%dx%d' % (size[0], size[1]),
87 '-pix_fmt', 'rgba' if withmask else 'rgb24',
---> 88 '-r', '%.02f' % fps,
89 '-an', '-i', '-'
90 ]
TypeError: must be real number, not NoneType
It appears that if you re-run the notebook without changing anything, everything then works, perhaps because imageio_ffmpeg has had time to load its ffmpeg executable (under the hood moviepy uses imageio_ffmpeg to get ffmpeg).
I tried to see if we could overcome this by loading the ffmpeg executable early on, but it did not work:
Description
We update the tutorial so that it is in line with the new tutorial structure in #291. We also expand the features demonstrated in this tutorial.
Depends on #291 and #295
moviepy woes
Update: It turns out this was all due to the decorator module not being loaded properly; see https://github.com/Zulko/moviepy/issues/1625 -- we just have to reload decorator so that moviepy imports it correctly.
One notable issue was that the tutorial needed ffmpeg to be installed in order to generate videos; this happens because the new Gymansium depends on moviepy for video recording, which in turn depends on ffmpeg. This is not a problem for Colab users as ffmpeg is already installed there, but local users may encounter frustration -- the video generation happens after the run, so they may do the run, wait for 2 hours, and then see that the videos fail. The steps that fail are as follows:
pip install -e .[visualize]
pip install jupyterlab
Leads to error on first
display_video
line with message looking like:It appears that if you re-run the notebook without changing anything, everything then works, perhaps because
imageio_ffmpeg
has had time to load its ffmpeg executable (under the hood moviepy usesimageio_ffmpeg
to get ffmpeg).I tried to see if we could overcome this by loading the ffmpeg executable early on, but it did not work:
I also tried installing moviepy beforehand, so if it is installed before running the notebook, everything works.
TODO
best_elite
latest
links withstable
(links will be broken but it's okay)Questions
Status
yapf
pytest
pylint
HISTORY.md