Author SHA1 Message Date
dodox c0e55b3f48 Merge remote-tracking branch 'original/pypi-package' into pypi-package 2023-11-23 21:16:53 +01:00
dodox beaf5df2fc Bring to parity with dev-branch 2023-11-23 21:14:11 +01:00
dodox 13e6a3b53a Merge branch '81_fix_docs_mp' into pypi-package 2023-11-23 20:56:55 +01:00
Dominik Roth 99ab2344ad Merge branch 'master' into pypi-package 2023-11-21 20:08:35 +01:00
dodox 74bede4ba3 fixed typo 2023-10-29 17:38:38 +01:00
dodox fae7c887ce Version Increment 2023-10-29 17:29:22 +01:00
dodox 0d3336b8d9 Made check for wether tagged commit is on master more robust 2023-10-29 17:28:45 +01:00
dodox 06e6c64e49 Version increment 2023-10-29 17:23:44 +01:00
dodox 9d1d925179 Require tagged commits to be on master for package to be published 2023-10-29 17:21:13 +01:00
dodox da5592124e Fix issue with trigger 2023-10-29 17:14:58 +01:00
dodox e32f836a3c Version increment 2023-10-29 17:02:12 +01:00
dodox bbd964ed80 Use full URLs for links in README (wont work on PyPI otherwise) 2023-10-29 16:50:02 +01:00
dodox f024613800 Prevent fallback to setup.py when building package 2023-10-29 16:02:10 +01:00
dodox 4a9ea368b8 fix typo in publish-to-test-pypi.yml 2023-10-29 14:39:02 +01:00
dodox 3c7df90810 Ensure we only react to push onto master; disable via if clause 2023-10-29 14:37:30 +01:00
dodox 707ec08808 Disable push to reakl PyPI for initial test 2023-10-29 14:21:08 +01:00
dodox 11a46889d9 Decrement version (we will start with 01.0 on PyPI) 2023-10-29 14:11:47 +01:00
dodox be250bee5e Add action to publish to real PyPI 2023-10-29 14:11:25 +01:00
dodox 049e45cb09 Print warning when setup.py is still used. 2023-10-23 14:51:21 +02:00
dodox af636164a8 Version bump and update setup.py 2023-10-23 14:34:43 +02:00
dodox d138c3c1f1 README: Minor improvements 2023-10-23 14:28:26 +02:00
dodox b277ed6477 Adding forward looking statements to README (Install instructions based on PyPI package) 2023-10-23 14:24:50 +02:00
dodox b183c002ef Provide setup.py as fallback (again) 2023-10-23 14:14:11 +02:00
dodox 5e63a72882 Version bump (to test Github Action) 2023-10-14 12:40:58 +02:00
dodox 0b240b9eb4 Define Github Action for test-PyPI publication 2023-10-14 12:24:04 +02:00
dodox a7031ce3b9 Version dump 2023-10-12 17:58:11 +02:00
dodox 4051a13324 README: GitHub ignores custom font-size; reverting to using h1 2023-10-12 17:47:34 +02:00
dodox ebb0e00675 Minor changes to pyproject.toml 2023-10-12 17:11:19 +02:00
dodox 6fea48f6c1 Increment version 2023-10-12 17:04:03 +02:00
dodox 4107704d9a Fix install instructions (look in both Test-PyPI & PyPI) 2023-10-12 17:03:34 +02:00
dodox a50d1788b1 PyPI does not support GitHub-Flavored Markdown. Using HTML-Code for
emojis now...
2023-10-12 16:54:45 +02:00
dodox 9538c999a0 Make sure the icon is always loaded from GitHub
So it is also visible on PyPI
2023-10-12 16:46:45 +02:00
dodox b0b58675b2 Don't try to export metaworld envs, if metaworld is not installed 2023-10-12 15:53:41 +02:00
dodox 9565f7972f removed typo 2023-10-12 15:48:19 +02:00
dodox 3f0c7b7302 Removing setup.py (built pipeline prefered it over pyproject.toml causing issues)
setup.py remains avaible on the legacy branch.
2023-10-12 15:37:39 +02:00
dodox 0c93280796 Improve handling of missing Metaworld 2023-10-12 15:34:36 +02:00
dodox a5b10e11a3 Allow gymnasium==0.26.0 2023-10-12 15:34:10 +02:00
dodox 894982f77f Fix typos in setup.py 2023-10-12 15:30:11 +02:00
dodox 95a6b9cf2c README: Minor cosmetic changes 2023-10-12 14:56:02 +02:00
dodox 6528c5d5b9 Update README (Test-PyPI and dependency changes) 2023-10-12 14:55:15 +02:00
dodox ce779bc6fb Make mujoco (modern version) a required dependency 2023-10-12 14:55:00 +02:00
dodox b6c67b1adc The pyproject.toml now actually works 2023-10-12 13:04:16 +02:00
dodox ee573788fc Fix: pyproject.toml license needs to point to file 2023-10-12 12:55:32 +02:00
dodox a5a29176cb Add 'all' as an optional installation to the toml 2023-10-12 12:47:37 +02:00
dodox d10ea23b4c Added Code of Conduct and Contributing guidelines to the MANIFEST 2023-10-12 12:41:55 +02:00
dodox 180b86771d Merge branch 'master' into pypi-package 2023-10-12 12:39:05 +02:00
dodox 10038f5d73 We need to use a MANIFEST rto insure inclusion of our *.stl and *.xml files 2023-10-12 12:34:55 +02:00
dodox 7a0f446406 Switching to pyproject.toml; setup.py will remain for backwards compat 2023-10-12 12:34:37 +02:00
11 changed files with 323 additions and 82 deletions
+52
View File
@@ -0,0 +1,52 @@
name: Publish Python package to PyPI
on:
push:
tags:
- '*'
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
if: false && startsWith(github.ref, 'refs/tags/') # Only run on tagged commits
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # This fetches all history for all branches and tags
- name: Verify tag is on master branch
run: |
TAG_IS_ON_MASTER=$(git branch -r --contains ${{ github.ref }} | grep 'origin/master')
if [ -z "$TAG_IS_ON_MASTER" ]; then
echo "Tag is not on the master branch. Cancelling the workflow."
exit 1
fi
echo "Tag is on the master branch. Proceeding with the workflow."
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build/setuptools/twine
run: >-
python3 -m
pip install
build setuptools twine
--user
- name: Prevent fallback onto setup.py
run: rm setup.py
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*
@@ -0,0 +1,52 @@
name: Publish Python package to TestPyPI
on:
push:
tags:
- '*'
jobs:
publish:
name: Publish to TestPyPI
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # Only run on tagged commits
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # This fetches all history for all branches and tags
- name: Verify tag is on master branch
run: |
TAG_IS_ON_MASTER=$(git branch -r --contains ${{ github.ref }} | grep 'origin/master')
if [ -z "$TAG_IS_ON_MASTER" ]; then
echo "Tag is not on the master branch. Cancelling the workflow."
exit 1
fi
echo "Tag is on the master branch. Proceeding with the workflow."
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build/setuptools/twine
run: >-
python3 -m
pip install
build setuptools twine
--user
- name: Prevent fallback onto setup.py
run: rm setup.py
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Publish to TestPyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+14
View File
@@ -0,0 +1,14 @@
# Include the README
include README.md
# Include the license, Code of Conduct and Contributing guidelines
include LICENSE
include CODE_OF_CONDUCT.md
include CONTRIBUTING.md
# Include stl and xml files from the fancy_gym/envs/mujoco directory
recursive-include fancy_gym/envs/mujoco *.stl
recursive-include fancy_gym/envs/mujoco *.xml
# Also shipping the most important part of fancy gym
include icon.svg
+54 -22
View File
@@ -1,12 +1,12 @@
<h1 align="center"> <h1 align="center">
<br> <br>
<img src='./icon.svg' width="250px"> <img src='https://raw.githubusercontent.com/ALRhub/fancy_gym/master/icon.svg' width="250px">
<br><br> <br><br>
<b>Fancy Gym</b> <b>Fancy Gym</b>
<br><br> <br><br>
</h1> </h1>
| :exclamation: Fancy Gym has recently received a major refactor, which also updated many of the used dependencies to current versions. The update has brought some breaking changes. If you want to access the old version, check out the [legacy branch](https://github.com/ALRhub/fancy_gym/tree/legacy). Find out more about what changed [here](https://github.com/ALRhub/fancy_gym/pull/75). | | &#x2757; Fancy Gym has recently received a major refactor, which also updated many of the used dependencies to current versions. The update has brought some breaking changes. If you want to access the old version, check out the [legacy branch](https://github.com/ALRhub/fancy_gym/tree/legacy). Find out more about what changed [here](https://github.com/ALRhub/fancy_gym/pull/75). |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Built upon the foundation of [Gymnasium](https://gymnasium.farama.org/) (a maintained fork of OpenAIs renowned Gym library) `fancy_gym` offers a comprehensive collection of reinforcement learning environments. Built upon the foundation of [Gymnasium](https://gymnasium.farama.org/) (a maintained fork of OpenAIs renowned Gym library) `fancy_gym` offers a comprehensive collection of reinforcement learning environments.
@@ -33,40 +33,72 @@ While the overarching objective of MP environments remains the learning of an op
## Installation ## Installation
1. Clone the repository We recommend installing `fancy_gym` into a virtual environment as provided by [venv](https://docs.python.org/3/library/venv.html). 3rd party alternatives to venv like [Poetry](https://python-poetry.org/) or [Conda](https://docs.conda.io/en/latest/) can also be used.
### Installation from PyPI (recommended)
Install `fancy_gym` via
```bash ```bash
git clone git@github.com:ALRhub/fancy_gym.git pip install fancy_gym
```
2. Go to the folder
```bash
cd fancy_gym
```
3. Install with
```bash
pip install -e .
``` ```
We have a few optional dependencies. If you also want to install those use We have a few optional dependencies. If you also want to install those use
```bash ```bash
pip install -e '.[all]' # to install all optional dependencies # to install all optional dependencies
pip install -e '.[dmc,metaworld,box2d,mujoco,mujoco-legacy,jax,testing]' # or choose only those you want pip install 'fancy_gym[all]'
# or choose only those you want
pip install 'fancy_gym[dmc,box2d,mujoco-legacy,jax,testing]'
```
Pip can not automatically install up-to-date versions of metaworld, since they are not avaible on PyPI yet.
Install metaworld via
```bash
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
```
### Installation from master
1. Clone the repository
```bash
git clone git@github.com:ALRhub/fancy_gym.git
```
2. Go to the folder
```bash
cd fancy_gym
```
3. Install with
```bash
pip install -e .
```
We have a few optional dependencies. If you also want to install those use
```bash
# to install all optional dependencies
pip install -e '.[all]'
# or choose only those you want
pip install -e '.[dmc,box2d,mujoco-legacy,jax,testing]'
```
Metaworld has to be installed manually with
```bash
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
``` ```
## How to use Fancy Gym ## How to use Fancy Gym
We will only show the basics here and prepared [multiple examples](fancy_gym/examples/) for a more detailed look. We will only show the basics here and prepared [multiple examples](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/examples/) for a more detailed look.
### Step-Based Environments ### Step-Based Environments
Regular step based environments added by Fancy Gym are added into the `fancy/` namespace. Regular step based environments added by Fancy Gym are added into the `fancy/` namespace.
| :exclamation: Legacy versions of Fancy Gym used `fancy_gym.make(...)`. This is no longer supported and will raise an Exception on new versions. | | &#x2757; Legacy versions of Fancy Gym used `fancy_gym.make(...)`. This is no longer supported and will raise an Exception on new versions. |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | | ----------------------------------------------------------------------------------------------------------------------------------------------- |
```python ```python
@@ -165,7 +197,7 @@ print(fancy_gym.MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['<my_custom_namespace>'])
### How to create a new MP task ### How to create a new MP task
In case a required task is not supported yet in the MP framework, it can be created relatively easy. For the task at In case a required task is not supported yet in the MP framework, it can be created relatively easy. For the task at
hand, the following [interface](fancy_gym/black_box/raw_interface_wrapper.py) needs to be implemented. hand, the following [interface](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/black_box/raw_interface_wrapper.py) needs to be implemented.
```python ```python
from abc import abstractmethod from abc import abstractmethod
@@ -251,7 +283,7 @@ class RawInterfaceWrapper(gym.Wrapper):
If you created a new task wrapper, feel free to open a PR, so we can integrate it for others to use as well. Without the If you created a new task wrapper, feel free to open a PR, so we can integrate it for others to use as well. Without the
integration the task can still be used. A rough outline can be shown here, for more details we recommend having a look integration the task can still be used. A rough outline can be shown here, for more details we recommend having a look
at the [examples](fancy_gym/examples/). at the [examples](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/examples/).
If the step-based is already registered with gym, you can simply do the following: If the step-based is already registered with gym, you can simply do the following:
+3
View File
@@ -6,7 +6,10 @@ from .envs.registry import ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS, MOVEMENT_PRIMITI
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['dm_control'] ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['dm_control']
ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['fancy'] ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['fancy']
if 'metaworld' in MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS:
ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['metaworld'] ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['metaworld']
else:
ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS = 'Metaworld is not installed.'
ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['gym'] ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['gym']
+7
View File
@@ -7,6 +7,13 @@ from ..envs.registry import register
from . import goal_object_change_mp_wrapper, goal_change_mp_wrapper, goal_endeffector_change_mp_wrapper, \ from . import goal_object_change_mp_wrapper, goal_change_mp_wrapper, goal_endeffector_change_mp_wrapper, \
object_change_mp_wrapper object_change_mp_wrapper
try:
import metaworld
except ModuleNotFoundError:
print('[FANCY GYM] Metaworld not avaible.')
else:
# Will only get executed, if import succeeds
from . import metaworld_adapter from . import metaworld_adapter
metaworld_adapter.register_all_ML1() metaworld_adapter.register_all_ML1()
-4
View File
@@ -11,11 +11,7 @@ import numpy as np
from fancy_gym.utils.env_compatibility import EnvCompatibility from fancy_gym.utils.env_compatibility import EnvCompatibility
try:
import metaworld import metaworld
except Exception:
print('[FANCY GYM] Metaworld not avaible')
class FixMetaworldHasIncorrectObsSpaceWrapper(gym.Wrapper, gym.utils.RecordConstructorArgs): class FixMetaworldHasIncorrectObsSpaceWrapper(gym.Wrapper, gym.utils.RecordConstructorArgs):
def __init__(self, env: gym.Env): def __init__(self, env: gym.Env):
+79
View File
@@ -0,0 +1,79 @@
[project]
name = "fancy_gym"
version = "0.1.4"
description = "Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches."
readme = "README.md"
authors = [
{name = "Fabian Otto", email = "fabian.otto@uni-tuebingen.de"},
{name = "Onur Celik", email = "celik@kit.edu"},
{name = "Dominik Roth", email = "fancy_gym@dominik-roth.eu"},
{name = "Hongyi Zhou", email = "hongyi.zhou@kit.edu"}
]
license = { text = "MIT License" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
dependencies = [
"mp_pytorch<=0.1.3",
"mujoco==2.3.3",
"gymnasium[mujoco]>=0.26.0"
]
requires-python = ">=3.7"
[project.urls]
"Homepage" = "https://github.com/ALRhub/fancy_gym/"
#"Documentation" = "https://github.com/ALRhub/fancy_gym/"
"Bug Tracker" = "https://github.com/ALRhub/fancy_gym/issues"
#"Repository" = "https://github.com/ALRhub/fancy_gym/"
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project.optional-dependencies]
dmc = ["shimmy[dm-control]", "Shimmy==1.0.0"]
# PyPi does not allow external dependencies. Metaworld will have to be installed manually until Farama publishes up-to-date version of metaworld on PyPi.
#metaworld = ["metaworld @ git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld"]
box2d = ["gymnasium[box2d]>=0.26.0"]
mujoco-legacy = ["mujoco-py>=2.1,<2.2", "cython<3"]
jax = ["jax>=0.4.0", "jaxlib>=0.4.0"]
all = [
# include all the optional dependencies
"shimmy[dm-control]",
"Shimmy==1.0.0",
#"metaworld @ git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld",
"mujoco==2.3.3",
"gymnasium[box2d,mujoco]>=0.26.0",
"mujoco-py>=2.1,<2.2",
"cython<3",
"jax>=0.4.0",
"jaxlib>=0.4.0"
]
testing = [
"pytest",
# include all the optional dependencies as well
"shimmy[dm-control]",
"Shimmy==1.0.0",
#"metaworld @ git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld",
"mujoco==2.3.3",
"gymnasium[box2d,mujoco]>=0.26.0",
"mujoco-py>=2.1,<2.2",
"cython<3",
"jax>=0.4.0",
"jaxlib>=0.4.0"
]
+9 -5
View File
@@ -1,15 +1,17 @@
# We still provide a setup.py for backwards compatability.
# But the pyproject.toml should be prefered.
import itertools import itertools
from pathlib import Path from pathlib import Path
from typing import List from typing import List
from setuptools import setup, find_packages from setuptools import setup, find_packages
print('[!] You are currently installing/building fancy_gym via setup.py. This is only provided for backwards-compatability. Please use the pyproject.toml instead.')
# Environment-specific dependencies for dmc and metaworld # Environment-specific dependencies for dmc and metaworld
extras = { extras = {
'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'], 'dmc': ['shimmy[dm-control]', 'Shimmy==1.0.0'],
'metaworld': ['mujoco==2.3.3', 'metaworld @ git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld'],
'box2d': ['gymnasium[box2d]>=0.26.0'], 'box2d': ['gymnasium[box2d]>=0.26.0'],
'mujoco': ['mujoco==2.3.3', 'gymnasium[mujoco]>0.26.0'],
'mujoco-legacy': ['mujoco-py >=2.1,<2.2', 'cython<3'], 'mujoco-legacy': ['mujoco-py >=2.1,<2.2', 'cython<3'],
'jax': ["jax >=0.4.0", "jaxlib >=0.4.0"], 'jax': ["jax >=0.4.0", "jaxlib >=0.4.0"],
'mushroom-rl': ['mushroom-rl'], 'mushroom-rl': ['mushroom-rl'],
@@ -36,7 +38,7 @@ def find_package_data(extensions_to_include: List[str]) -> List[str]:
setup( setup(
author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou', author='Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou',
name='fancy_gym', name='fancy_gym',
version='1.0', version='0.1.0',
classifiers=[ classifiers=[
'Development Status :: 4 - Beta', 'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research', 'Intended Audience :: Science/Research',
@@ -49,11 +51,13 @@ setup(
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
], ],
extras_require=extras, extras_require=extras,
install_requires=[ install_requires=[
'gymnasium>=0.26.0', 'mp_pytorch<=0.1.3',
'mp_pytorch<=0.1.3' 'mujoco==2.3.3',
'gymnasium[mujoco]>=0.26.0'
], ],
packages=[package for package in find_packages( packages=[package for package in find_packages(
) if package.startswith("fancy_gym")], ) if package.startswith("fancy_gym")],
+3 -1
View File
@@ -12,7 +12,9 @@ GYM_IDS = [spec.id for spec in gym.envs.registry.values() if
not isinstance(spec.entry_point, Callable) and not isinstance(spec.entry_point, Callable) and
"fancy_gym" not in spec.entry_point and 'make_bb_env_helper' not in spec.entry_point "fancy_gym" not in spec.entry_point and 'make_bb_env_helper' not in spec.entry_point
and 'jax' not in spec.id.lower() and 'jax' not in spec.id.lower()
and 'jax' not in spec.id.lower() and 'shimmy' not in spec.id.lower()
and 'ale_py' not in spec.id.lower()
and 'tabular' not in spec.id.lower()
and not re.match(r'GymV2.Environment', spec.id) and not re.match(r'GymV2.Environment', spec.id)
] ]
GYM_MP_IDS = fancy_gym.ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS['all'] GYM_MP_IDS = fancy_gym.ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS['all']
+1 -1
View File
@@ -103,7 +103,7 @@ def test_verbosity(mp_type: str, env_wrap: Tuple[str, Type[RawInterfaceWrapper]]
env_step = make(env_id) env_step = make(env_id)
env_step.reset() env_step.reset()
_obs, _reward, _terminated, _truncated, info = env.step(env.action_space.sample()) _obs, _reward, _terminated, _truncated, info = env_step.step(env_step.action_space.sample())
info_keys_step = info.keys() info_keys_step = info.keys()
assert all(e in info_keys for e in info_keys_step) assert all(e in info_keys for e in info_keys_step)