We have an example of how to use our gym wrapper with OpenAI baselines,
but it was out of date with the latest updates to the baselines library.
This updates the instructions in the gym_unity README and adds an example
of using PPO2 with a Unity environment.
* Add option to set gym visual observation to uint8
* Add option to flatten branched discrete actions
* Add game_over variable to gym wrapper
* Add guide on how to use Dopamine with the gym wrapper and comparisons with Baselines and PPO
* Ticked API :
- Ticked API for pypi for mlagents
- Ticked API for pypi for unity-gym
- Ticked Communication number for API
- Ticked Model Loader number for API
* Ticked the API for the pytest
- Ticked API for pypi for mlagents
- Ticked API for pypi for mlagents_envs
- Ticked Communication number for API
- Ticked API for unity-gym
* Ticked the API for the pytest
* WIP precommit on top level
* update CI
* circleci fixes
* intentionally fail black
* use --show-diff-on-failure in CI
* fix command order
* rebreak a file
* apply black
* WIP enable mypy
* run mypy on each package
* fix trainer_metrics mypy errors
* more mypy errors
* more mypy
* Fix some partially typed functions
* types for take_action_outputs
* fix formatting
* cleanup
* generate stubs for proto objects
* fix ml-agents-env mypy errors
* disallow-incomplete-defs for gym-unity
* Add CI notes to CONTRIBUTING.md
- Fix issue with BC Trainer `increment_steps`.
- Fix issue with Demonstration Recorder and visual observations (memory leak fix was deleting vis obs too early).
- Make Samplers sample from the same random seed every time, so generalization runs are repeatable.
- Fix crash when using GAIL, Curiosity, and visual observations together.
In order for downstream packages to make use of the latest
pre-release features, we can pre-release versions of our packages.
For packages ending in `devN` pip will not install that package
version by default. This change manually updates our package version
to a development version with the idea that we can manually perform
development versions with the potential for future automated / nightly
dev releases.
* This addresses #1835. Baselines expects single environments used with their ppo2 algorithm to be wrapped in a DummyVecEnv. The old readme did not instruct the reader to do so and the code failed to run with the latest version of baselines. This imports the correct function from baselines and fixes the make_unity_env function described in the readme.
* added line to gym-unity/README.md to note the version of baselines the examples were tested with
We have been ignoring unused imports and star imports via flake8. These are
both bad practice and grow over time without automated checking. This
commit attempts to fix all existing import errors and add back the corresponding
flake8 checks.
* 1 to 1 Brain to Agent
This is a work in progess
In this PR :
- Deleted all Brain Objects
- Moved the BrainParameters into the Agent
- Gave the Agent a Heuristic method (see Balance Ball for example)
- Modified the Communicator and ModelRunner : Put can only take one agent at a time
- Made the IBrain Interface with RequestDecision and DecideAction method
No changes made to Python
[Design Doc](https://docs.google.com/document/d/1hBhBxZ9lepGF4H6fc6Hu6AW7UwOmnyX3trmgI3HpOmo/edit#)
* Removing editorconfig
* Updating BallanceBall scene
* grammar mistake
* Clearing the Agents of the Model runner
* Added Documentation on IBrain
* Modified comments on GiveModel
* Introduced a factory
* Split Learning Brain in two
* Changes to walljump
* Fixing the Unit tests
* Renaming the Brain to Policy
* Heuristic now has priority over training
* Edited code comments
* Fixing bugs
* Develop one to one scene edits...
* add VERSION variable to each setup.py
* update setups and config
* fix index
* fix indent for real
* fix parameter
* Bump version to 0.11.0.dev0
* Change CircleCI config to support dev releases
* Minor fix to deploy regex
* fix url in comments
* More circleCI tweaks
* Remove filters / 0.11.0.dev3
* Use test .pypirc
* Add config file flag to twine
* Manually pass user and pass to twine
* 0.11.0.dev0
* add precommit validation step
* remove todo
* Revert version to 0.10.1
* Docstring tweaks
* fix gym version
* Update package and communicator versions to 0.11
* Remove pip cache fallback for CircleCI
This change removes the caching fallback in the case where dependencies
change, since it can cause CI failures when we have incompatible
dependencies in the cache.
* Limit Tensorflow version for tests to <2.0
* Use stable bokken image. (#2815)
* build fixes for 2018+ (#2808)
* rename CompressionType enum
* fix standalone build test for 2018+
* Add more editor versions for testing. (#2809)
* class variable for API verison, fix env tests (#2817)
* fixed area prefab
agents were pointing to the wrong laser gameObject.
* allow --version argument in mlagents-learn
* Develop version print add strings (#2945)
* add __version__ to libs
* more version info
* use actual version
* initial commit for LL-API
* fixing ml-agents-envs tests
* Implementing action masks
* training is fixed for 3DBall
* Tests all fixed, gym is broken and missing documentation changes
* adding case where no vector obs
* Fixed Gym
* fixing tests of float64
* fixing float64
* reverting some of brain.py
* removing old proto apis
* comment type fixes
* added properties to AgentGroupSpec and edited the notebooks.
* clearing the notebook outputs
* Update gym-unity/gym_unity/tests/test_gym.py
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Update gym-unity/gym_unity/tests/test_gym.py
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Update ml-agents-envs/mlagents/envs/base_env.py
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Update ml-agents-envs/mlagents/envs/base_env.py
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* addressing first comments
* NaN checks for r...
* Hotfix on Gym and the notebooks
* REMOVING THE PROTO GENERATION TESTS
* REMOVING THE PROTO GENERATION TESTS
* Update notebooks/getting-started-gym.ipynb
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Trying to enforce nuget version
* Update notebooks/getting-started-gym.ipynb
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Removing proto_generation
* Update notebooks/getting-started-gym.ipynb
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Update docstring
Co-authored-by: Chris Elion <celion@gmail.com>
* Bumping versions on master
* Bumping package version
* Made the package version 0.15.0-preview
* Reverting the API version that was bumped by mistake
* [bug-fix] Increase height of wall in CrawlerStatic (#3650)
* [bug-fix] Improve performance for PPO with continuous actions (#3662)
* Corrected a typo in a name of a function (#3670)
OnEpsiodeBegin was corrected to OnEpisodeBegin in Migrating.md document
* Add Academy.AutomaticSteppingEnabled to migration (#3666)
* Fix editor port in Dockerfile (#3674)
* Hotfix memory leak on Python (#3664)
* Hotfix memory leak on Python
* Fixing
* Fixing a bug in the heuristic policy. A decision should not be requested when the agent is done
* [bug-fix] Make Python able to deal with 0-step episodes (#3671)
* adding some comments
Co-authored-by: Ervin T <ervin@unity3d.com>
* Remove vis_encode_type from list of required (#3677)
* Update changelog (#3678)
* Shorten timeout duration for environment close (#3679)
The timeout duration for closing an environment was set to the
same duration as the timeout when waiting ...
* [skip ci] WIP : Modify the base_env.py file
* [skip ci] typo
* [skip ci] renamed some methods
* [skip ci] Incorporated changes from our meeting
* [skip ci] everything is broken
* [skip ci] everything is broken
* [skip ci] formatting
* Fixing the gym tests
* Fixing bug, C# has an error that needs fixing
* Fixing the test
* relaxing the threshold of 0.99 to 0.9
* fixing the C# side
* formating
* Fixed the llapi integratio test
* [Increasing steps for testing]
* Fixing the python tests
* Need __contains__ after all
* changing the max_steps in the tests
* addressing comments
* Making env_manager logic clearer as proposed in the comments
* Remove duplicated logic and added back in episode length (#3728)
* removing mentions of multi-agent in gym and changed the docstring in base_env.py
* Edited the Documentation for the changes to the LLAPI (#3733)
* Edite...
* Making Gym a wrapper
* Readding no graphics to the run gym test
* typo
* Modifying the changelog and the migrating doc
* Applying pre-commit
* [skip ci] Update gym-unity/gym_unity/tests/test_gym.py
Co-Authored-By: Chris Elion <chris.elion@unity3d.com>
* Adding a note that the BaseEnv will close when the wrapper closes
* FoRgOt To rUn PrE-ComMiT
Co-authored-by: Chris Elion <chris.elion@unity3d.com>
* write release_tag too
* fix leading empty line
* update circle jobs and release tag logic
* set default to empty string
* set release tag, add sanity check
* Several, small documentation improvements
- Re-organize main repo README
- Minor clean-ups to Python package-specific readme files
- Clean-up to Unity Inference Engine page
- Update to the docs README
- Added a specific cross-platform section in ML-Agents Overview to amplify Barracuda
- Updated the links in Limitations.md to point to the specific subsections
- Cleaned up the Designing a Learning Environment page. Added an intro paragraph.
- Updated the installation guide to specifically call out local installation
- A few minor formatting, spelling errors fixed.
* [bug-fix] Fix issue with initialize not resetting step count (#3962)
* Develop better error message for #3953 (#3963)
* Making the error for wrong number of agents raise consistently
* Better error message for inputs of wrong dimensions
* Fix#3932, stop the editor from going into a loop when a prefab is selected. (#3949)
* Minor doc updates to release
* add unit tests and fix exceptions (#3930)
Co-authored-by: Ervin T <ervin@unity3d.com>
Co-authored-by: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
Co-authored-by: Chris Goy <christopherg@unity3d.com>
* Replaced get_behavior_names and get_behavior_spec with behavior_specs property
* Fixing the test
* [ci]
* addressing some comments
* use typing.Mapping (#3948)
* Update ml-agents-envs/mlagents_envs/base_env.py
Co-authored-by: Chris Elion <chris.elion@unity3d.com>
* Adding the documentation
Co-authored-by: Chris Elion <chris.elion@unity3d.com>
* allow vector observations also when using visual observations
* update changelog
* Update CHANGELOG.md
* Update __init__.py
* remove trailing whitespace
* Fix test case where visual and vector observations are used simultaneously
* fix formatting
* add test for visual and vector observations
* Assert vector action shape
* Fix test environment to return multiple visual observations
* use_visual and allow_multiple_visual_obs are replaced by allow_multiple_obs which allows visual and vector observations to be used simultaneously.
* fixing run_gym.py test
* [ci]
* Added some more tests and made the observation space a tuple when using multiple observations
* Modifying the change log
* Addding to the Migrating doc
* Edits to Migrating.md
* Simplification of the code to generate the observation spaces
* Simplified warning messages
* Adding contr...
* Update Dockerfile
* Separate send environment data from reset (#4128)
* Fixed a typo on ML-Agents-Overview.md (#4130)
Fixed redundant "to" word from the sentence since it is probably a typo in document.
* Updated the badge’s link to point to the newest doc version
* Replaced all of the doc to release_3_doc
* Fix 3DBall and 3DBallHard SAC regressions (#4132)
* Move memory validation to settings
* Update docs
* Add settings test
* Update to release_3 in installation.md (#4144)
* rename to SideChannelManager +backcompat (#4137)
* Remove comment about logo with --help (#4148)
* [bugfix] Make FoodCollector heuristic playable (#4147)
* Make FoodCollector heuristic playable
* Update changelog
* script to check for old release links and references (#4153)
* Remove package validation suite from Project (#4146)
* RayPerceptionSensor: handle empty and invalid tags (#4155...
* Update versions for release 4
* Link validation file should ignore itself
* Remove 'unreleased' section from changelog
* Change to 0.18.0 for python versions
* also update extensions package version
Co-authored-by: Chris Elion <chris.elion@unity3d.com>
- updated release tag validation script to automate the updating of files with release tags that need to be changed as part of the pre-commit operation.
* Edit the gym-unity Readme to fix some issue in the sample code
* Update gym-unity/README.md
Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com>
* addressing comments
* Adding the action_seed parameter to the documentation
Co-authored-by: andrewcoh <54679309+andrewcoh@users.noreply.github.com>