Skip to content

Commit

Permalink
Adding render mode to creating of single envs (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
reginald-mclean authored Oct 4, 2023
1 parent d155d00 commit bb78fc7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
- name: Upload to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _build
folder: _build
2 changes: 1 addition & 1 deletion docs/citation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ You can cite Metaworld as follows:
primaryClass={cs.LG},
url={https://arxiv.org/abs/1910.10897}
}
```
```
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

# -- Project information -----------------------------------------------------
import os
from typing import Any, Dict

import metaworld
# import metaworld

# from typing import Any, Dict


project = "Metaworld"
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```
3 changes: 2 additions & 1 deletion metaworld/envs/mujoco/env_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit bb78fc7

Please sign in to comment.