diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8d16fa4..1823745 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -90,6 +90,7 @@ jobs: uses: codecov/codecov-action@v4 with: fail_ci_if_error: false # optional (default = false) + files: ./coverage.xml,./coverage_parallel.xml flags: unittests # optional name: codecov-umbrella # optional token: ${{ secrets.CODECOV_TOKEN }} # required diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 0bb5499..fd7b8c9 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -37,4 +37,4 @@ sphinx: # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html python: install: - - requirements: docs/requirements-docs.txt \ No newline at end of file + - requirements: requirements.lock \ No newline at end of file diff --git a/README.md b/README.md index f9c0f7a..30169c8 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ state = state.copy() action = env.action_space.sample() data = env.step(state=state, action=action) -new_state, observ, reward, end, info = data +new_state, observ, reward, end, truncated, info = data ``` @@ -52,7 +52,7 @@ states = [state.copy() for _ in range(10)] actions = [env.action_space.sample() for _ in range(10)] data = env.step_batch(states=states, actions=actions) -new_states, observs, rewards, ends, infos = data +new_states, observs, rewards, ends, truncateds, infos = data ``` @@ -68,62 +68,11 @@ states = [state.copy() for _ in range(10)] actions = [env.action_space.sample() for _ in range(10)] data = env.step_batch(states=states, actions=actions) -new_states, observs, rewards, ends, infos = data +new_states, observs, rewards, ends, truncateds, infos = data ``` ## Installation -Plangym is tested on Ubuntu 20.04 and Ubuntu 21.04 for python versions 3.7 and 3.8. - -Installing it with Python 3.6 will break AtariEnv, and RetroEnv does not support -python 3.9 yet. - -### Installing from Pip -Assuming that the environment libraries that you want to use are already installed, you can -install plangym from pip running: -```bash -pip3 install plangym -``` - -### Installing from source -If you also want to install the environment libraries, first clone the repository: - -```bash -git clone git@github.com:FragileTech/plangym.git -cd plangym -``` - -Install the system dependencies by running -```bash -sudo apt-get install -y --no-install-suggests --no-install-recommends libglfw3 libglew-dev libgl1-mesa-glx libosmesa6 xvfb swig -``` - -To install MuJoCo, run: -```bash -make install-mujoco -``` - -Finally, install the project requirements and plangym. -```bash -pip install -r requirements.txt -pip install . -``` - -## Roadmap - -This is a summary of the incoming improvements to the project: -- **Improved documentation**: - * Adding specific tutorials for all the different types of supported environments. - * Adding a developer guide section for incorporating new environments to plangym. - * Improving the library docstrings with more examples and detailed information. -- **Better gym integration**: - * Registering all of plangym environments in gym under a namespace. - * Offering more control over how the states are passed to `step`, `reset` and `step_batch`. - * Allowing to return the states inside the info dictionary. -- **Adding new environments to plangym, such as**: - * Gym mujoco - * Gym robotics - * [Gym-pybullet-drones](https://github.com/utiasDSL/gym-pybullet-drones) -- **Support for rendering in notebooks that are running on headless machines**. +TODO: Meanwhile take a look at how we set up the repository in `.github/workflows/push.yaml`. ## License Plangym is released under the [MIT](LICENSE) license. diff --git a/docs/source/conf.py b/docs/source/conf.py index b4385a5..81b5389 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,20 +59,21 @@ def __getattr__(cls, name): "sphinx.ext.napoleon", "sphinx.ext.autosectionlabel", "sphinx.ext.autodoc.typehints", + "sphinx_book_theme", "myst_nb", - # "myst_parser", - # "sphinx.ext.githubpages", - # "m2r", + "sphinxcontrib.mermaid", + "sphinx.ext.githubpages", + "sphinx_copybutton", + "sphinx_togglebutton", ] suppress_warnings = ["image.nonlocal_uri"] autodoc_typehints = "description" -autodoc_mock_imports = ["ray"] # Autoapi settings autoapi_type = "python" autoapi_dirs = ["../../src/plangym"] autoapi_add_toctree_entry = True # Make use of custom templates -# autoapi_template_dir = "_autoapi_templates" +autoapi_template_dir = "_autoapi_templates" exclude_patterns.append("_autoapi_templates/index.rst") # Ignore sphinx-autoapi warnings on multiple target description @@ -105,7 +106,25 @@ def __getattr__(cls, name): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "sphinx_rtd_theme" +html_title = "" +html_theme = "sphinx_book_theme" +# html_logo = "_static/logo-wide.svg" +# html_favicon = "_static/logo-square.svg" +html_theme_options = { + "github_url": "https://github.com/poolsideai/fragile", + "repository_url": "https://github.com/poolsideai/fragile", + "repository_branch": "gh-pages", + "home_page_in_toc": True, + "path_to_docs": "docs", + "show_navbar_depth": 1, + "use_edit_page_button": True, + "use_repository_button": True, + "use_download_button": True, + "launch_buttons": { + "binderhub_url": "https://mybinder.org", + "notebook_interface": "classic", + }, +} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, @@ -113,10 +132,8 @@ def __getattr__(cls, name): html_static_path = ["_static"] # myst_parser options +nb_execution_mode = "off" myst_heading_anchors = 2 -myst_number_code_blocks = ["python"] -# myst_update_mathjax = False -autosectionlabel_prefix_document = True myst_enable_extensions = [ "amsmath", "colon_fence", diff --git a/pyproject.toml b/pyproject.toml index f792645..4f526fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,7 @@ docs = [ "sphinx_rtd_theme", "jupyter-cache", "sphinx-copybutton", + "sphinx-togglebutton", "sphinxext-opengraph", "sphinxcontrib-bibtex", ] @@ -90,8 +91,10 @@ import-roms = { cmd = "python3 src/plangym/scripts/import_retro_roms.py" } "test:parallel" = { cmd = "pytest -n auto -s -o log_cli=true -o log_cli_level=info tests", env-file = ".multicore.env" } "test:singlecore" = { cmd = "pytest -s -o log_cli=true -o log_cli_level=info tests/control/test_classic_control.py", env-file = ".onecore.env" } "test:doctest" = { cmd = "pytest --doctest-modules -n 0 -s -o log_cli=true -o log_cli_level=info src", env-file = ".multicore.env" } -"codecov:parallel" = { cmd = "pytest -n auto -s -o log_cli=true -o log_cli_level=info --cov=./ --cov-report=xml --cov-config=pyproject.toml tests", env-file = ".multicore.env" } +"codecov:parallel" = { cmd = "pytest -n auto -s -o log_cli=true -o log_cli_level=info --cov=./ --cov-report=xml:coverage_parallel.xml --cov-config=pyproject.toml tests", env-file = ".multicore.env" } "codecov:singlecore" = { cmd = "pytest --doctest-modules -s -o log_cli=true -o log_cli_level=info --cov=./ --cov-report=xml --cov-config=pyproject.toml tests/control/test_classic_control.py", env-file = ".onecore.env" } +build-docs = { cmd = "sphinx-build -b html docs/source docs/build"} +serve-docs = { cmd = "python3 -m http.server --directory docs/build" } [tool.ruff] # Assume Python 3.10 diff --git a/requirements-dev.lock b/requirements-dev.lock new file mode 100644 index 0000000..3f17d3c --- /dev/null +++ b/requirements-dev.lock @@ -0,0 +1,581 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: true +# with-sources: false +# generate-hashes: false +# universal: true + +-e file:. +absl-py==2.1.0 + # via dm-control + # via dm-env + # via labmaze + # via mujoco +accessible-pygments==0.0.5 + # via pydata-sphinx-theme +aiosignal==1.3.1 + # via ray +alabaster==1.0.0 + # via sphinx +ale-py==0.8.1 + # via plangym + # via shimmy +anyio==4.4.0 + # via httpx + # via jupyter-server +appnope==0.1.4 ; platform_system == 'Darwin' + # via ipykernel +argon2-cffi==23.1.0 + # via jupyter-server +argon2-cffi-bindings==21.2.0 + # via argon2-cffi +arrow==1.3.0 + # via isoduration +astroid==3.3.2 + # via sphinx-autoapi + # via sphinx-autodoc2 +asttokens==2.4.1 + # via stack-data +async-lru==2.0.4 + # via jupyterlab +attrs==24.2.0 + # via hypothesis + # via jsonschema + # via jupyter-cache + # via referencing +autorom==0.4.2 + # via gym + # via gymnasium +autorom-accept-rom-license==0.6.1 + # via autorom +babel==2.16.0 + # via jupyterlab-server + # via pydata-sphinx-theme + # via sphinx +beautifulsoup4==4.12.3 + # via nbconvert + # via pydata-sphinx-theme +bleach==6.1.0 + # via nbconvert +box2d-py==2.3.5 + # via plangym +certifi==2024.8.30 + # via httpcore + # via httpx + # via requests +cffi==1.17.0 + # via argon2-cffi-bindings + # via pyzmq +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via autorom + # via autorom-accept-rom-license + # via jupyter-cache + # via ray +cloudpickle==3.0.0 + # via gym + # via gymnasium +colorama==0.4.6 ; sys_platform == 'win32' or platform_system == 'Windows' + # via click + # via ipython + # via pytest + # via sphinx + # via tqdm +comm==0.2.2 + # via ipykernel +coverage==7.6.1 + # via pytest-cov +debugpy==1.8.5 + # via ipykernel +decorator==5.1.1 + # via ipython +defusedxml==0.7.1 + # via nbconvert +distro==1.9.0 + # via ruyaml +dm-control==1.0.22 + # via plangym +dm-env==1.6 + # via dm-control +dm-tree==0.1.8 + # via dm-control + # via dm-env +docutils==0.21.2 + # via myst-parser + # via pybtex-docutils + # via pydata-sphinx-theme + # via sphinx + # via sphinx-togglebutton + # via sphinxcontrib-bibtex +etils==1.7.0 + # via mujoco +exceptiongroup==1.2.2 ; python_full_version < '3.11' + # via anyio + # via hypothesis + # via ipython + # via pytest +execnet==2.1.1 + # via pytest-xdist +executing==2.0.1 + # via stack-data +farama-notifications==0.0.4 + # via gymnasium +fastjsonschema==2.20.0 + # via nbformat +filelock==3.15.4 + # via ray +fqdn==1.5.1 + # via jsonschema +frozenlist==1.4.1 + # via aiosignal + # via ray +fsspec==2024.6.1 + # via etils +glfw==2.7.0 + # via dm-control + # via mujoco +greenlet==3.0.3 ; (python_full_version < '3.13' and platform_machine == 'AMD64') or (python_full_version < '3.13' and platform_machine == 'WIN32') or (python_full_version < '3.13' and platform_machine == 'aarch64') or (python_full_version < '3.13' and platform_machine == 'amd64') or (python_full_version < '3.13' and platform_machine == 'ppc64le') or (python_full_version < '3.13' and platform_machine == 'win32') or (python_full_version < '3.13' and platform_machine == 'x86_64') + # via sqlalchemy +gym @ git+https://github.com/FragileTech/gym.git@507d04d43a81602959e29eecfea51404b791a6d4 + # via nes-py + # via plangym +gym-super-mario-bros==7.3.2 + # via plangym +gymnasium==0.29.1 + # via plangym + # via shimmy + # via stable-retro +h11==0.14.0 + # via httpcore +httpcore==1.0.5 + # via httpx +httpx==0.27.2 + # via jupyterlab +hypothesis==6.111.2 + # via plangym +idna==3.8 + # via anyio + # via httpx + # via jsonschema + # via requests +imageio==2.35.1 + # via plangym +imagesize==1.4.1 + # via sphinx +importlib-metadata==8.4.0 + # via jupyter-cache + # via myst-nb +importlib-resources==6.4.4 + # via ale-py + # via etils +iniconfig==2.0.0 + # via pytest +ipykernel==6.29.5 + # via jupyterlab + # via myst-nb +ipython==8.27.0 + # via ipykernel + # via myst-nb +isoduration==20.11.0 + # via jsonschema +jedi==0.19.1 + # via ipython +jinja2==3.1.4 + # via jupyter-server + # via jupyterlab + # via jupyterlab-server + # via myst-parser + # via nbconvert + # via sphinx + # via sphinx-autoapi +json5==0.9.25 + # via jupyterlab-server +jsonpointer==3.0.0 + # via jsonschema +jsonschema==4.23.0 + # via jupyter-events + # via jupyterlab-server + # via nbformat + # via ray +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-cache==1.0.0 + # via myst-nb + # via plangym +jupyter-client==8.6.2 + # via ipykernel + # via jupyter-server + # via nbclient +jupyter-core==5.7.2 + # via ipykernel + # via jupyter-client + # via jupyter-server + # via jupyterlab + # via nbclient + # via nbconvert + # via nbformat +jupyter-events==0.10.0 + # via jupyter-server +jupyter-lsp==2.2.5 + # via jupyterlab +jupyter-server==2.14.2 + # via jupyter-lsp + # via jupyterlab + # via jupyterlab-server + # via notebook-shim +jupyter-server-terminals==0.5.3 + # via jupyter-server +jupyterlab==4.2.5 + # via plangym +jupyterlab-pygments==0.3.0 + # via nbconvert +jupyterlab-server==2.27.3 + # via jupyterlab +labmaze==1.0.6 + # via dm-control +latexcodec==3.0.0 + # via pybtex +linkify-it-py==2.0.3 + # via plangym +lxml==5.3.0 + # via dm-control +markdown-it-py==3.0.0 + # via mdit-py-plugins + # via myst-parser +markupsafe==2.1.5 + # via jinja2 + # via nbconvert +matplotlib-inline==0.1.7 + # via ipykernel + # via ipython +mdit-py-plugins==0.4.1 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +mistune==3.0.2 + # via nbconvert +msgpack==1.0.8 + # via ray +mujoco==3.2.2 + # via dm-control +myst-nb==1.1.1 + # via plangym +myst-parser==4.0.0 + # via myst-nb + # via plangym +nbclient==0.10.0 + # via jupyter-cache + # via myst-nb + # via nbconvert +nbconvert==7.16.4 + # via jupyter-server +nbformat==5.10.4 + # via jupyter-cache + # via jupyter-server + # via myst-nb + # via nbclient + # via nbconvert +nes-py @ git+https://github.com/FragileTech/nes-py@1ca4da5a97ac8987874f214054ccbd08e102a899 + # via gym-super-mario-bros + # via plangym +nest-asyncio==1.6.0 + # via ipykernel +notebook-shim==0.2.4 + # via jupyterlab +numpy==2.1.0 + # via ale-py + # via dm-control + # via dm-env + # via gym + # via gymnasium + # via imageio + # via labmaze + # via mujoco + # via nes-py + # via opencv-python + # via plangym + # via scipy + # via shimmy +opencv-python==4.10.0.84 + # via plangym +overrides==7.7.0 + # via jupyter-server +packaging==24.1 + # via ipykernel + # via jupyter-server + # via jupyterlab + # via jupyterlab-server + # via nbconvert + # via pydata-sphinx-theme + # via pytest + # via pytest-rerunfailures + # via ray + # via sphinx +pandocfilters==1.5.1 + # via nbconvert +parso==0.8.4 + # via jedi +pexpect==4.9.0 ; sys_platform != 'emscripten' and sys_platform != 'win32' + # via ipython +pillow==10.4.0 + # via imageio + # via plangym +platformdirs==4.2.2 + # via jupyter-core +pluggy==1.5.0 + # via pytest +prometheus-client==0.20.0 + # via jupyter-server +prompt-toolkit==3.0.47 + # via ipython +protobuf==5.28.0 + # via dm-control + # via ray +psutil==6.0.0 + # via ipykernel + # via plangym +ptyprocess==0.7.0 ; os_name != 'nt' or (sys_platform != 'emscripten' and sys_platform != 'win32') + # via pexpect + # via terminado +pure-eval==0.2.3 + # via stack-data +pybtex==0.24.0 + # via pybtex-docutils + # via sphinxcontrib-bibtex +pybtex-docutils==1.0.3 + # via sphinxcontrib-bibtex +pycparser==2.22 + # via cffi +pydata-sphinx-theme==0.15.4 + # via plangym + # via sphinx-book-theme +pygame==2.6.0 + # via gymnasium + # via plangym +pyglet==1.5.11 + # via nes-py + # via plangym + # via stable-retro +pygments==2.18.0 + # via accessible-pygments + # via ipython + # via nbconvert + # via pydata-sphinx-theme + # via sphinx +pyopengl==3.1.7 + # via dm-control + # via mujoco +pyparsing==3.1.4 + # via dm-control +pytest==8.3.2 + # via plangym + # via pytest-cov + # via pytest-rerunfailures + # via pytest-xdist +pytest-cov==5.0.0 + # via plangym +pytest-rerunfailures==14.0 + # via plangym +pytest-xdist==3.6.1 + # via plangym +python-dateutil==2.9.0.post0 + # via arrow + # via jupyter-client +python-json-logger==2.0.7 + # via jupyter-events +pyvirtualdisplay==3.0 + # via plangym +pywin32==306 ; platform_python_implementation != 'PyPy' and sys_platform == 'win32' + # via jupyter-core +pywinpty==2.0.13 ; os_name == 'nt' + # via jupyter-server + # via jupyter-server-terminals + # via terminado +pyyaml==6.0.2 + # via jupyter-cache + # via jupyter-events + # via myst-nb + # via myst-parser + # via pybtex + # via ray + # via sphinx-autoapi +pyzmq==26.2.0 + # via ipykernel + # via jupyter-client + # via jupyter-server +ray==2.35.0 + # via plangym +referencing==0.35.1 + # via jsonschema + # via jsonschema-specifications + # via jupyter-events +requests==2.32.3 + # via autorom + # via autorom-accept-rom-license + # via dm-control + # via jupyterlab-server + # via ray + # via sphinx +rfc3339-validator==0.1.4 + # via jsonschema + # via jupyter-events +rfc3986-validator==0.1.1 + # via jsonschema + # via jupyter-events +rpds-py==0.20.0 + # via jsonschema + # via referencing +ruff==0.6.3 +ruyaml==0.91.0 + # via plangym +scipy==1.14.1 + # via dm-control +send2trash==1.8.3 + # via jupyter-server +setuptools==74.0.0 + # via dm-control + # via jupyterlab + # via labmaze + # via ruyaml + # via sphinx-togglebutton +shimmy==0.2.1 + # via gymnasium +six==1.16.0 + # via asttokens + # via bleach + # via pybtex + # via python-dateutil + # via rfc3339-validator +sniffio==1.3.1 + # via anyio + # via httpx +snowballstemmer==2.2.0 + # via sphinx +sortedcontainers==2.4.0 + # via hypothesis +soupsieve==2.6 + # via beautifulsoup4 +sphinx==8.0.2 + # via myst-nb + # via myst-parser + # via plangym + # via pydata-sphinx-theme + # via sphinx-autoapi + # via sphinx-book-theme + # via sphinx-copybutton + # via sphinx-rtd-theme + # via sphinx-togglebutton + # via sphinxcontrib-bibtex + # via sphinxext-opengraph +sphinx-autoapi==3.3.0 + # via plangym +sphinx-autodoc2==0.5.0 + # via plangym +sphinx-book-theme==1.1.3 + # via plangym +sphinx-copybutton==0.5.2 + # via plangym +sphinx-rtd-theme==0.5.1 + # via plangym +sphinx-togglebutton==0.3.2 + # via plangym +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-bibtex==2.6.2 + # via plangym +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-mermaid==0.9.2 + # via plangym +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx +sphinxext-opengraph==0.9.1 + # via plangym +sqlalchemy==2.0.32 + # via jupyter-cache +stable-retro==0.9.2 + # via plangym +stack-data==0.6.3 + # via ipython +tabulate==0.9.0 + # via jupyter-cache +terminado==0.18.1 + # via jupyter-server + # via jupyter-server-terminals +tinycss2==1.3.0 + # via nbconvert +tomli==2.0.1 + # via coverage + # via jupyterlab + # via plangym + # via pytest + # via sphinx + # via sphinx-autodoc2 +tornado==6.4.1 + # via ipykernel + # via jupyter-client + # via jupyter-server + # via jupyterlab + # via terminado +tqdm==4.66.5 + # via autorom + # via dm-control + # via nes-py +traitlets==5.14.3 + # via comm + # via ipykernel + # via ipython + # via jupyter-client + # via jupyter-core + # via jupyter-events + # via jupyter-server + # via jupyterlab + # via matplotlib-inline + # via nbclient + # via nbconvert + # via nbformat +types-python-dateutil==2.9.0.20240821 + # via arrow +typing-extensions==4.12.2 + # via ale-py + # via anyio + # via astroid + # via async-lru + # via etils + # via gymnasium + # via ipython + # via myst-nb + # via pydata-sphinx-theme + # via sphinx-autodoc2 + # via sqlalchemy +uc-micro-py==1.0.3 + # via linkify-it-py +uri-template==1.3.0 + # via jsonschema +urllib3==2.2.2 + # via requests +wcwidth==0.2.13 + # via prompt-toolkit +webcolors==24.8.0 + # via jsonschema +webencodings==0.5.1 + # via bleach + # via tinycss2 +websocket-client==1.8.0 + # via jupyter-server +wheel==0.44.0 + # via sphinx-togglebutton +zipp==3.20.1 + # via etils + # via importlib-metadata diff --git a/docs/requirements-docs.txt b/requirements.lock similarity index 98% rename from docs/requirements-docs.txt rename to requirements.lock index bc1cb36..faac2e2 100644 --- a/docs/requirements-docs.txt +++ b/requirements.lock @@ -110,6 +110,7 @@ docutils==0.21.2 # via pybtex-docutils # via pydata-sphinx-theme # via sphinx + # via sphinx-togglebutton # via sphinxcontrib-bibtex etils==1.7.0 # via mujoco @@ -440,6 +441,7 @@ setuptools==74.0.0 # via jupyterlab # via labmaze # via ruyaml + # via sphinx-togglebutton shimmy==0.2.1 # via gymnasium six==1.16.0 @@ -466,6 +468,7 @@ sphinx==8.0.2 # via sphinx-book-theme # via sphinx-copybutton # via sphinx-rtd-theme + # via sphinx-togglebutton # via sphinxcontrib-bibtex # via sphinxext-opengraph sphinx-autoapi==3.3.0 @@ -478,6 +481,8 @@ sphinx-copybutton==0.5.2 # via plangym sphinx-rtd-theme==0.5.1 # via plangym +sphinx-togglebutton==0.3.2 + # via plangym sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-bibtex==2.6.2 @@ -568,6 +573,8 @@ webencodings==0.5.1 # via tinycss2 websocket-client==1.8.0 # via jupyter-server +wheel==0.44.0 + # via sphinx-togglebutton zipp==3.20.1 # via etils # via importlib-metadata diff --git a/src/plangym/control/dm_control.py b/src/plangym/control/dm_control.py index 638a063..0fe14ef 100644 --- a/src/plangym/control/dm_control.py +++ b/src/plangym/control/dm_control.py @@ -47,6 +47,7 @@ def __init__( render_mode="rgb_array", obs_type: str | None = None, remove_time_limit=None, # noqa: ARG002 + return_image: bool = False, ): """Initialize a :class:`DMControlEnv`. @@ -69,6 +70,7 @@ def __init__( render_mode: None|human|rgb_array. remove_time_limit: Ignored. obs_type: One of {"coords", "rgb", "grayscale"}. + return_image: If ``True``, add a "rgb" key to the observation dict. """ self._visualize_reward = visualize_reward @@ -84,6 +86,7 @@ def __init__( autoreset=autoreset, render_mode=render_mode, obs_type=obs_type, + return_image=return_image, ) @property