From bb78fc74c0b9de11d979e0fe0db3f7b169d78336 Mon Sep 17 00:00:00 2001 From: Reggie <72816837+reginald-mclean@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:57:23 -0400 Subject: [PATCH] Adding render mode to creating of single envs (#442) --- .github/workflows/build-docs.yml | 2 +- docs/citation.md | 2 +- docs/conf.py | 5 +++-- docs/introduction/installation.md | 2 +- metaworld/envs/mujoco/env_dict.py | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index cf3029d48..30200dce7 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -38,4 +38,4 @@ jobs: - name: Upload to GitHub Pages uses: JamesIves/github-pages-deploy-action@v4 with: - folder: _build \ No newline at end of file + folder: _build diff --git a/docs/citation.md b/docs/citation.md index 0eb9128bc..c276c9c84 100644 --- a/docs/citation.md +++ b/docs/citation.md @@ -13,4 +13,4 @@ You can cite Metaworld as follows: primaryClass={cs.LG}, url={https://arxiv.org/abs/1910.10897} } -``` \ No newline at end of file +``` diff --git a/docs/conf.py b/docs/conf.py index aa1d9a960..7f02f27f4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,9 +16,10 @@ # -- Project information ----------------------------------------------------- import os -from typing import Any, Dict -import metaworld +# import metaworld + +# from typing import Any, Dict project = "Metaworld" diff --git a/docs/introduction/installation.md b/docs/introduction/installation.md index 6227ed68f..8eb172a43 100644 --- a/docs/introduction/installation.md +++ b/docs/introduction/installation.md @@ -18,4 +18,4 @@ pip install -e . For users attempting to reproduce results found in the Meta-World paper please use this command: ``` pip install git+https://github.com/Farama-Foundation/Metaworld.git@04be337a12305e393c0caf0cbf5ec7755c7c8feb -``` \ No newline at end of file +``` diff --git a/metaworld/envs/mujoco/env_dict.py b/metaworld/envs/mujoco/env_dict.py index d11358451..99cbc53a9 100644 --- a/metaworld/envs/mujoco/env_dict.py +++ b/metaworld/envs/mujoco/env_dict.py @@ -401,7 +401,7 @@ def create_observable_goal_envs(): for env_name, env_cls in ALL_V2_ENVIRONMENTS.items(): d = {} - def initialize(env, seed=None): + def initialize(env, seed=None, render_mode=None): if seed is not None: st0 = np.random.get_state() np.random.seed(seed) @@ -410,6 +410,7 @@ def initialize(env, seed=None): env._partially_observable = False env._freeze_rand_vec = False env._set_task_called = True + env.render_mode = render_mode env.reset() env._freeze_rand_vec = True if seed is not None: