* refactor: required version in env name
* refactor: rename env_id function
* refactor: regex + function logic
* test: some more edge cases + error
* refactor: version max/comparison
- Move version max/comparison in a method
- Remove type ignore to improve type checking
* fix: failing tests & error introduced in rebasing
* refactor: simplify map and remove type ignore
* refactor: remove _is_lesser_version() method
* refactor: _versions() to return NamedTuples
* chore: remove minor changes
* Refactor registration EnvSpec and EnvSpecTree
* test: move tests from #2513 here
* fix: typing
* test: try to fix unregistered env
* refactor: change InitVar id name for typing
Changed InitVar id name to fix the following typing error:
error: Declaration "id" is obscured by a declaration of the same name
* refactor: return only the first difflib match
* test: improve tear down of added test env
* refactor: dataclass fields
* refactor: compile regex pattern only once
* refactor: `_assert_version_exists()`
`_assert_version_exists()` rewritten from @JesseFarebro:
https://github.com/openai/gym/pull/2535#discussion_r777573839
* refactor: latest_spec -> latest_versioned_spec
* fix: bug + typing + test
* Add default/versioned tests
* Fix Env field defaults
* feat: improve versioned/unversioned env handling
* Disallow versioned/unversioned registration/lookup
* test: remove warning + check default suggestion
Co-authored-by: Jesse Farebrother <jessefarebro@gmail.com>
* Allow custom observation spaces in VectorEnv
* Replace np.copy by deepcopy in reset of SyncVectorEnv
* Add tests for VectorEnv with custom spaces
* Add tests for shared memory and batches of custom spaces
* Remove unused import in VectorEnv test
* Add warning note in the Space class for custom spaces
* Initial version of vectorized environments
* Raise an exception in the main process if child process raises an exception
* Add list of exposed functions in vector module
* Use deepcopy instead of np.copy
* Add documentation for vector utils
* Add tests for copy in AsyncVectorEnv
* Add example in documentation for batch_space
* Add cloudpickle dependency in setup.py
* Fix __del__ in VectorEnv
* Check if all observation spaces are equal in AsyncVectorEnv
* Check if all observation spaces are equal in SyncVectorEnv
* Fix spaces non equality in SyncVectorEnv for Python 2
* Handle None parameter in create_empty_array
* Fix check_observation_space with spaces equality
* Raise an exception when operations are out of order in AsyncVectorEnv
* Add version requirement for cloudpickle
* Use a state instead of binary flags in AsyncVectorEnv
* Use numpy.zeros when initializing observations in vectorized environments
* Remove poll from public API in AsyncVectorEnv
* Remove close_extras from VectorEnv
* Add test between AsyncVectorEnv and SyncVectorEnv
* Remove close in check_observation_space
* Add documentation for seed and close
* Refactor exceptions for AsyncVectorEnv
* Close pipes if the environment raises an error
* Add tests for out of order operations
* Change default argument in create_empty_array to np.zeros
* Add get_attr and set_attr methods to VectorEnv
* Improve consistency in SyncVectorEnv
* Add WIP Monitored wrapper
* Remove irrelevant render after close monitor test
* py27 compatibility
* Fix test_benchmark
* Move Monitored out of wrappers __init__
* Turn Monitored into a function that returns a Monitor class
* Fix monitor tests
* Remove deprecated test
* Remove deprecated utility
* Prevent duplicate wrapping, add test
* Fix test
* close env in tests to prevent writing to nonexistent file
* Disable semisuper tests
* typo
* Fix failing spec
* Fix monitoring on semisuper tasks
* Allow disabling of duplicate check
* Rename MonitorManager
* Monitored -> Monitor
* Clean up comments
* Remove cruft
* Make environments seedable
* Fix monitor bugs
- Set monitor_id before setting the infix. This was a bug that would yield incorrect results with multiple monitors.
- Remove extra pid from stats recorder filename. This should be purely cosmetic.
* Start uploading seeds in episode_batch
* Fix _bigint_from_bytes for python3
* Set seed explicitly in random_agent
* Pass through seed argument
* Also pass through random state to spaces
* Pass random state into the observation/action spaces
* Make all _seed methods return the list of used seeds
* Switch over to np.random where possible
* Start hashing seeds, and also seed doom engine
* Fixup seeding determinism in many cases
* Seed before loading the ROM
* Make seeding more Python3 friendly
* Make the MuJoCo skipping a bit more forgiving
* Remove debugging PDB calls
* Make setInt argument into raw bytes
* Validate and upload seeds
* Skip box2d
* Make seeds smaller, and change representation of seeds in upload
* Handle long seeds
* Fix RandomAgent example to be deterministic
* Handle integer types correctly in Python2 and Python3
* Try caching pip
* Try adding swap
* Add df and free calls
* Bump swap
* Bump swap size
* Try setting overcommit
* Try other sysctls
* Try fixing overcommit
* Try just setting overcommit_memory=1
* Add explanatory comment
* Add what's new section to readme
* BUG: Mark ElevatorAction-ram-v0 as non-deterministic for now
* Document seed
* Move nondetermistic check into spec