Commit Graph

1935 Commits

Author SHA1 Message Date
Vairo Di Pasquale
a18e0a3d6c Fix lunar lander reward doc (#3064)
* Improved documentation to specify decode state space

* Improve taxi documentation

* Fixed LunarLanderv2 reward doc
2022-09-05 10:36:04 -04:00
Jongwook Choi
525b98305b Correct the module scope of DeprecationWarning warning filter (#3059)
The `warnings.simplefilter(...)` call mistakenly voids and nullifies
all the previous warning filters for DeprecationWarning, registered by
other packages or user programs via `warnings.filterwarnings` call
which has an explicit intention of suppress DeprecationWarning.

Control of DeprecationWarning's made in the gym library should have
effects only within the gym package.
2022-09-05 10:35:56 -04:00
Omar Younis
0608263025 environment agnostic {mode}_list render mode (#3060) 2022-09-04 09:42:10 -04:00
Mark Towers
f39747d6a2 Update Composite spaces with full coverage (#3047)
* Update composite space and tests

* Pre-commit

* pyright

* Fix pyright

* retrigger actions

* Code review by Arjun

* Code review by Arjun

* Code review by Omar
2022-09-03 18:39:23 -04:00
Mark Towers
8e74fe3b62 Add testing for Fundamental spaces with full coverage (#3048)
* initial commit

* Fix the multi-binary sample and upgrade multi-discrete sample

* Fix MultiBinary sample tests and pre-commit

* Adds coverage tests and updates test_utils.py to use the utils.py spaces. Fix bug in text.py

* pre-commit
2022-09-03 17:56:29 -04:00
Omar Younis
43b42d5280 cliffwalking: remove annoying warnings (#3058)
* cliffwalking: remove annoying warning

* fix pre-commit
2022-09-03 14:54:28 -04:00
Omar Younis
c79ac2efe8 fix test_record_video_within_vector (#3055) 2022-09-01 14:07:06 -04:00
Mark Towers
0bcd49ec10 Updates the make and registration functions with better parameters and hints (#3041)
* Initial commit

* Add missing __init__ for EnvSpec

* third time a charm

* Replace entry_point=None with entry_point="no-entry-point"

* Readd make overloads, updated with all gym envs

* pre-commit

* Add apply_step_compatibility to make and add testing

* Code review by Arjun
2022-09-01 11:02:31 -04:00
Mark Towers
799c8d20c1 Rename "rgb_array" to "rgb_array_list" and "single_rgb_array" to "rgb_array" (#3040)
* initial commit

* Fix CI

* Fixed CI

* third time the charm

* Fix mujoco environment render modes order

* Remove unnecessary changes

* pre-commit

* Fix tests

* Comment out test render modes

* Fix code review and readd mujoco

* pre-commit

* Fix testing envs

* Fix all GenericTestEnvs

* Do not run mujoco-py render environments
2022-09-01 09:06:42 -04:00
Fiete
aaa6cd9f33 replace references to gymlibrary.ml with new .dev domain (#3053) 2022-08-31 17:33:46 -04:00
Mark Towers
ab3e02db83 Reduce the number of unexpected warnings during testing (#3050)
* Initial commit

* Remove unnecessary `warnings.simplefilters`

* Fix tests for new step API

* Fix testing

Co-authored-by: Markus28 <montcyril@gmail.com>
2022-08-30 14:47:26 -04:00
Arjun KG
54b406b799 Support only new step API (while retaining compatibility functions) (#3019) 2022-08-30 10:11:59 -04:00
Mark Towers
884ba08f19 initial commit (#3046) 2022-08-29 18:04:03 -04:00
Omar Younis
2a9853fdc3 Add save_video util and deprecate RecordVideo in favor of it (#3016)
* init

* add save_video util

* simplify API @pseudo-rnd-thoughts

* fix video_length and remove folder warning

* remove RecordVideo deprecation warnings

* add test record video

* avoid test failing cascade
2022-08-29 18:01:17 -04:00
YouJiacheng
44e9475cda Fix#3043 (#3044) 2022-08-24 12:20:24 -04:00
Ariel Kwiatkowski
6e2e921b5f Update README.md (#3039) 2022-08-23 11:10:15 -04:00
John Balis
3a8daafce1 Removing return_info argument to env.reset() and deprecated env.seed() function (reset now always returns info) (#2962)
* removed return_info, made info dict mandatory in reset

* tenatively removed deprecated seed api for environments

* added more info type checks to wrapper tests

* formatting/style compliance

* addressed some comments

* polish to address review

* fixed tests after merge, and added a test of the return_info deprecation assertion if found in reset signature

* some organization of env_checker tests, reverted a probably merge error

* added deprecation check for seed function in env

* updated docstring

* removed debug prints, tweaked test_check_seed_deprecation

* changed return_info deprecation check from assertion to warning

* fixes to vector envs, now  should be correctly structured

* added some explanation and typehints for mockup depcreated return info reset function

* re-removed seed function from vector envs

* added explanation to _reset_return_info_type and changed the return statement
2022-08-23 11:09:54 -04:00
Ariel Kwiatkowski
1f864789fd Fix toy_text rendering on headless machines (#3037)
* Do stuff with pygame init only in human mode

* Fix CliffWalking

* Pre-commit
2022-08-22 11:36:40 -04:00
I-Ju Lin
0e53948eb0 Rename rotors in mujoco swimmer (#3036) 2022-08-22 11:36:16 -04:00
Omar Younis
de9eed541b Remove old Render API (#3027)
* init

* add .gitignore

* fix .gitignore

* remove internal backend use

* fix VideoRecorder test

* fix .gitignore

* fix order enforcing tests

* adapt play.py

* reformat

* fix .gitignore

* add type to DummyPlayEnv
2022-08-22 11:21:08 -04:00
Jordan Terry
22555c62aa Update README.md 2022-08-22 11:05:00 -04:00
John Balis
7b0b85cbca removed inline RandomNumberGenerator implementation (#3022) 2022-08-22 09:20:28 -04:00
Daniel Y. Kim
78c3faac04 Fixed typo in the contributing guidelines (#3035)
* Fix typo in pre-commit

* Fix markdown syntax for gogle docstring style hyperlink
2022-08-21 13:14:55 -04:00
Mark Towers
1061949d0c Update to v0.25.2 (#3033) 2022-08-18 14:24:42 -04:00
Mark Towers
a8d4dd7b14 Add testing for step api compatibility functions and wrapper (#3028)
* Initial commit

* Fixed tests and forced TimeLimit.truncated to always exist when truncated or terminated

* Fix CI issues

* pre-commit

* Revert back to old language

* Revert changes to step api wrapper
2022-08-18 10:25:46 -04:00
Xuehai Pan
aa43d135eb Consider key order in spaces.Dict.__eq__ (#3024) 2022-08-18 08:49:02 -04:00
Ariel Kwiatkowski
51c2026f19 Fix unpickling Box2D and MuJoCo envs (#3025)
* Try to fix car racing unpickling

* Fix EzPickle for BipedalWalker and LunarLander

* Shamelessly steal the pickle-unpickle test from Mark, with slight modifications

* CarRacing EzPickle fix

* Mujoco ezpickle fix
2022-08-16 12:05:36 -04:00
Mark Towers
f54319e742 Type hint mujoco_env.py and update pyright (#3015)
* Investigated the pyright attributes and removed mujoco from ignored

* Fixed pyright CI
2022-08-16 11:59:18 -04:00
Olaf Lipinski
a6b87f1ae1 Reduce memory consumption and hanging for Dict and Tuple spaces (#3011)
* Reduce memory consumption and hanging.

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>

* Use len(subseeds) instead of x.
Clearer error message

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>

* Allow for non-unique seeds in subspaces

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>

* Update docstrings

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>

* Update doc for Tuple

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>

Signed-off-by: Olaf Lipinski <o.lipinski@soton.ac.uk>
2022-08-16 11:59:10 -04:00
YouJiacheng
e24877a870 Avoid metaclass conflicts when inheriting from gym.Env (#3001)
Using __init_subclass__ instead of metaclass, suggested by PEP 487(introduced in python3.6).
As a result, downstream package can safely inherit from gym.Env and abc.ABC/Protocol/...(classes with metaclass != type), or set their own metaclass without making a intermediate metaclass inherited from custom metaclass and type(gym.Env).
2022-08-16 11:19:31 -04:00
Raja Grewal
3303783811 Corrected episode end description for mujoco/ant (#3029) 2022-08-16 09:21:51 -04:00
Arjun KG
3da6b6e143 handle no info mask (#3026) 2022-08-15 11:23:00 -04:00
Markus Krimmel
63ea5f2517 Add Sequence space, update flatten functions (#2968)
* Added Sequence space, updated flatten functions to work with Sequence, Graph. WIP.

* Small fixes, added Sequence space to tests

* Replace Optional[Any] by Any

* Added tests for flattening of non-numpy-flattenable spaces

* Return all seeds
2022-08-15 11:11:32 -04:00
Mark Towers
8b744130bc Fixed all environment close issues in testing (#3020) 2022-08-08 17:41:15 -04:00
Andrea PIERRÉ
607602b531 Add swig as a Box2D dependency (#3009) 2022-08-03 07:40:29 -04:00
Alexander Zhang
dce35dfa92 Add type annotations for metadata and render_mode (#3007) 2022-08-01 07:53:41 -04:00
Mark Towers
96e6cd66df Version v0.25.1 (#2988) 2022-07-26 18:29:43 -04:00
Omar Younis
9d35dc8746 fix render popping when render is called internally for Wrappers (#2998)
* fix render popping when render is called internally

* move _render workaround from Wrapper to PixelObservation
2022-07-26 18:20:51 -04:00
Omar Younis
cb3df610e3 Add pygame GUI for Cliffwalking (#2997)
* fix typo

* add pygame render cliffwalking

* refactor frozen lake, new images for cliffwalking

* backto old images

* improve graphics

* use old images

* refactor frozen lake

* reformat
2022-07-26 16:31:18 -04:00
I-Ju Lin
b8115b0b07 Update swimmer_v4.py (#2993)
Fix the type-o of rotors
2022-07-26 16:23:28 -04:00
Mark Towers
3ea8819803 backward compatibility when metadata doesn't include render mode (#2990) 2022-07-26 08:40:35 -04:00
Georg Reich
ddd441953d fixed bipedal walker render rgb_array (#2991)
(returning uncropped width)
2022-07-24 14:57:02 -04:00
Vangelis
39b8661cb0 Rephrase observations' definition in Lunar Lander Environment (#2987) 2022-07-23 10:39:15 -04:00
Mark Towers
3c60ae97d1 Remove pytest.importorskip (#2976) 2022-07-23 10:38:52 -04:00
Ice1187
8461425286 Fix typo (#2980) 2022-07-21 09:00:57 -04:00
Vincent Moens
8e812e1de5 Raise warning in PixelObservationWrapper if render_mode is None (#2978)
* init

* adapt PixelObservationWrapper to new API

* reformat

Co-authored-by: younik <omar.younis98@gmail.com>
2022-07-18 11:30:12 -04:00
Zhiqing Xiao
ce6bad7185 Bug fix: Revert an incorrect edition on wrapper.FrameStack (#2973) 2022-07-18 09:25:00 -04:00
Tim Gates
e741d4203a docs: Fix a few typos (#2971) 2022-07-17 16:50:56 -04:00
Mark Towers
5dc2076285 Updating the docstring disable_env_checker (#2967) 2022-07-17 16:50:40 -04:00
Pablo Samuel Castro
98a929303f Fix reset bounds for mountain car (#2965)
* Fix reset bounds for mountain car

This was a typo bug that was introduced in ca39816943

* Fix reset bounds for mountain_car

This was a typo bug that was introduced in ca39816943

* Fixing formatting of files with pre-commit
2022-07-15 05:22:34 -04:00