Граф коммитов

760 Коммитов

Автор SHA1 Сообщение Дата
Maryam Honari 0f5b761886 remove unreleased section (#16) 2022-03-25 11:37:59 -07:00
Maryam Honari 679fce7e28 Release 2.3.0 exp.1 (#13)
* upgrade package to 2.3.0-exp.1

* rebase on develop branch

* update changelog
2022-03-23 14:38:44 -07:00
Jason Bowman 5f28846b66 Update automated trigger rules to support oneflow develop branch (#11)
* Update automated trigger rules to support oneflow develop branch

* Fix release branch name for github actions
2022-03-23 14:11:50 -07:00
Maryam Honari cd4fac7610 add validation test dep. to publish job (#12)
* add validation test dep. to publish job
* fix package path
2022-03-21 15:03:11 -07:00
Miguel Alonso Jr 96150d0526 Updated README. (#8) 2022-03-21 12:54:07 -04:00
Maryam Honari 9ab6158c0a bump barracuda to 3.0.0 (#9)
upgrade to barracuda 3.0.0
2022-03-11 10:46:13 -08:00
Xun Cao 0590d3fe81 add coverage publish promotion yamato jobs (#3) 2022-03-04 11:22:43 -08:00
Maryam Honari 24ce875a0c Add visibility to pro package (#7) 2022-03-02 10:10:33 -08:00
Miguel Alonso Jr e79faf24da Added #if to exclude communicator registration in the Agent awake script (#6) 2022-02-28 15:53:36 -05:00
Miguel Alonso Jr 8224ac9f9e Set execution order to be negative to make sure scripts run before default time. (#5) 2022-02-25 14:28:25 -05:00
Miguel Alonso Jr 8d9f3f7960 Fix execution order (#4)
* Fixed execution order.

* Fixed bug with CRT build.

* precommit formatting update.

* Updated agent Awake docstring.
2022-02-24 15:09:02 -05:00
Miguel Alonso Jr 24ed0233bb Fixed failing tests. (#2)
* Fixed failing tests.

* Adding meta files.
2022-02-22 18:04:09 -05:00
Miguel Alonso Jr 70cb5bdcae Refactor for MLA pro support. (#1)
* Refactored for MLA pro support.

* Fixed bug in yamato test.

* Updated the CHANGELOG.

* Fixed trigger logic in yamato test.
2022-02-18 16:07:59 -05:00
Miguel Alonso Jr 0055f482ea Pin dotnet version for GHA formatting. 2022-02-16 19:27:38 -05:00
Miguel Alonso Jr 2ba7ce4524 Updated to CHANGELOG and VectorSensor from mono repo before swap. 2022-02-16 19:21:44 -05:00
Miguel Alonso Jr 6cbcb8c6ca Added yamato test yaml. 2022-02-14 23:18:04 -05:00
Miguel Alonso Jr e32c40c0ff Refactored yamato pack. 2022-02-14 18:12:32 -05:00
Miguel Alonso Jr 457a670fc9 Updated precommit gh action. 2022-02-14 13:22:58 -05:00
Miguel Alonso Jr cbadc50931 Fixed bug with validate_meta_files.py missing a file to exclude. 2022-02-11 12:28:03 -05:00
Miguel Alonso Jr 1f05bbe861 Updates for pre-commit and github actions. 2022-02-11 12:24:19 -05:00
Miguel Alonso Jr cf227954cc removing unused github workflows. 2022-02-11 11:31:42 -05:00
Miguel Alonso Jr aa1fc14f61 Refactoring for extraction to separate repo. 2022-02-11 09:25:37 -05:00
Miguel Alonso Jr 286e4106c3 Develop python api ga (#6)
* Dropped support for python 3.6

* Pinning python 3.9.9 for tests due to typing issues with 3.9.10

* Testing new bokken image.

* Testing new bokken image.

* Updated yamato standalone build test.

* Updated yamato standalone build test.

* Updated standalone build test.

* Updated yamato configs to use mla bokken vm.

* Bug fixes for yamato yml files.

* Fixed com.unity.ml-agents-test.yml

* Bumped min python version to 3.7.2

* pettingzoo api prototype

* add example

* update file names

* support multiple behavior names

* fix multi behavior action index

* add install in colab

* add setup

* update colab

* fix __init__

* clone single branch

* import tags only

* import in init

* catch import error

* update colab

* move colab and add readme

* handle agent dying

* add tests

* update doc

* add info

* add action mask

* fix action mask

* update action masks in colab

* change default env

* set version

* fix hybrid action

* fix colab for hybrid actions

* add note on auto reset

* Updated colab name.

* Update README.md

* Following petting_zoo registry API (#5557)

* init petting_zoo registry

* cherrypick Custom trainer editor analytics (#5511)

* cherrypick "Update dotnet-format to address breaking changes introduced by upstream changes (#5528)"

* Update colab to match pettingZoo import api

* ToRevert: pull exp-petting-registry branch

* Add init file to tests

* Install pettingzoo-unity requirements for pytest

* update pytest command

* Add docstrings and comments

* update coverage to pettingzoo folder

* unset log level

* update env string

* Two small bugfixes (#5589)

1. Add the missing `_cumulative_rewards` property
2. Update `agent_selection` to not error out when an agent finishes an episode.

* Updated gym to 0.21.0 and petting zoo to 1.13.1, fixed bugs with AEC wrapper for gym and PZ updates. API tests are passing.

* Some refactoring.

* Finished inital implementation of parallel. Tests not passing.

* Finished parallel API implementation and refactor. All PZ tests passing.

* Cleanup.

* Refactoring.

* Pinning numpy version.

* add metadata and behavior_specs initialization

* addressing behaviour_spec issues

* Bumped PZ version to 1.14.0. Fixed failing tests.

* Refactored gym-unity and petting-zoo into ml-agents-envs

* Added TODO to pydoc-config.yaml

* Refactored gym and pz to be under a subpackage in mlagents_env package

* Refactored ml-agents-envs docs.

* Minor update to PZ API doc.

* Updated mlagents_envs docs and colab.

* Updated pytest gh workflow to remove ref to gym and pz.

* Refactored to remove some test coupling between trainers and envs.

* Updated installation doc.

* Update ml-agents-envs/README.md

Co-authored-by: Andrew Cohen <andrew.cohen@unity3d.com>

* Updated failing yamato jobs.

* pettingzoo api prototype

* add example

* update file names

* support multiple behavior names

* fix multi behavior action index

* add install in colab

* add setup

* update colab

* fix __init__

* clone single branch

* import tags only

* import in init

* catch import error

* update colab

* move colab and add readme

* handle agent dying

* add tests

* update doc

* add info

* add action mask

* fix action mask

* update action masks in colab

* change default env

* set version

* fix hybrid action

* fix colab for hybrid actions

* add note on auto reset

* Updated colab name.

* Update README.md

* Following petting_zoo registry API (#5557)

* init petting_zoo registry

* cherrypick Custom trainer editor analytics (#5511)

* cherrypick "Update dotnet-format to address breaking changes introduced by upstream changes (#5528)"

* Update colab to match pettingZoo import api

* ToRevert: pull exp-petting-registry branch

* Add init file to tests

* Install pettingzoo-unity requirements for pytest

* update pytest command

* Add docstrings and comments

* update coverage to pettingzoo folder

* unset log level

* update env string

* Two small bugfixes (#5589)

1. Add the missing `_cumulative_rewards` property
2. Update `agent_selection` to not error out when an agent finishes an episode.

* Updated gym to 0.21.0 and petting zoo to 1.13.1, fixed bugs with AEC wrapper for gym and PZ updates. API tests are passing.

* Some refactoring.

* Finished inital implementation of parallel. Tests not passing.

* Finished parallel API implementation and refactor. All PZ tests passing.

* Cleanup.

* Refactoring.

* Pinning numpy version.

* add metadata and behavior_specs initialization

* addressing behaviour_spec issues

* Bumped PZ version to 1.14.0. Fixed failing tests.

* Refactored gym-unity and petting-zoo into ml-agents-envs

* Added TODO to pydoc-config.yaml

* Refactored gym and pz to be under a subpackage in mlagents_env package

* Refactored ml-agents-envs docs.

* Minor update to PZ API doc.

* Updated mlagents_envs docs and colab.

* Updated pytest gh workflow to remove ref to gym and pz.

* Refactored to remove some test coupling between trainers and envs.

* Updated installation doc.

* Update ml-agents-envs/README.md

Co-authored-by: Andrew Cohen <andrew.cohen@unity3d.com>

* Updated CHANGELOG.

* Updated Migration guide.

* Doc updates based on CR.

* Updated github workflow for colab tests.

* Updated github workflow for colab tests.

* Updated github workflow for colab tests.

* Fixed yamato import error.

Co-authored-by: Ruo-Ping Dong <ruoping.dong@unity3d.com>
Co-authored-by: Miguel Alonso Jr <miguelalonsojr>
Co-authored-by: jmercado1985 <75792879+jmercado1985@users.noreply.github.com>
Co-authored-by: Maryam Honari <honari.m94@gmail.com>
Co-authored-by: Henry Peteet <henry.peteet@unity3d.com>
Co-authored-by: mahon94 <maryam.honari@unity3d.com>
Co-authored-by: Andrew Cohen <andrew.cohen@unity3d.com>
2022-02-02 19:32:23 -05:00
Miguel Alonso Jr 864d94be2d Develop deprecate python 3.6 (#5)
* Dropped support for python 3.6

* Pinning python 3.9.9 for tests due to typing issues with 3.9.10

* Testing new bokken image.

* Testing new bokken image.

* Updated yamato standalone build test.

* Updated yamato standalone build test.

* Updated standalone build test.

* Updated yamato configs to use mla bokken vm.

* Bug fixes for yamato yml files.

* Fixed com.unity.ml-agents-test.yml

* Bumped min python version to 3.7.2

* Updated failing yamato jobs.

* Updated github workflow for colab tests.

* Updated github workflow for colab tests.

* Updated github workflow for colab tests.
2022-02-02 08:53:34 -05:00
Miguel Alonso Jr bc7d39ff80 Fixed build-docker and updated CHANGELOG to add unreleased section. (#5682)
* Fixed build-docker and updated CHANGELOG to add unreleased section.

* Updated backward compat mac training yamato test. (#5685)
2022-01-18 14:52:43 -05:00
Miguel Alonso Jr 0b06649f5a Bumped package version for patch. 2022-01-17 12:34:59 -05:00
Miguel Alonso Jr 372f34f014 Update CHANGELOG.md 2022-01-17 12:34:59 -05:00
Miguel Alonso Jr 787527bb76 Release 19 branch lts deprecation (#5673)
* Updated Project and DevProject to 2020.3 LTS.

* Updated supported LTS version to 2020.3.

* Updated changelog.

* Bumped up CI Unity version from 2020.2 to 2020.3.

* Update CHANGELOG.md

* Removing VS Studio dependency from manifest.json.

* Update packages-lock.json
2022-01-17 12:34:59 -05:00
Miguel Alonso Jr 20d7d25cf5 Updates for package validation errors. (#5671) 2022-01-17 12:34:59 -05:00
Miguel Alonso Jr a7e7558108 Updated release versions and release links. (#5669) 2022-01-17 12:34:59 -05:00
Miguel Alonso Jr 0a3f271f9c Removed unreleased section. (#5667) 2022-01-17 12:34:59 -05:00
Miguel Alonso Jr b91f85ace8 Updated versions for main. Also updated validate versions script to r… (#5668)
* Updated versions for main. Also updated validate versions script to remove exp.1 from package version.

* Reverted validate versions.

* Updated versions.

* Bumped package version for patch.
2022-01-14 17:10:05 -05:00
Xun Cao 9d84b91c7f enable 3D Ball sample import button in package manager for unity sdk (#5665)
* enable 3D Ball sample import button in package manager for unity sdk

* add Samples folder

* add meta file

* fix git ignore config
2022-01-13 12:21:21 -08:00
Miguel Alonso Jr f0393812b2 Changelog prepped for release (#5629)
* Changelog prepped for release

* Added missing PRs to the changelog.

* Added missing CHANGELOG item.
2022-01-06 19:19:50 -05:00
Jason Rupert 265a5d1fb2 Update DQN Colab example to support export for Barracuda inference (#5643)
* Update DQN GridWorld colab example to be capable of outputting an ONNX model that works for inference.
-Allow GridWorld to work without a GoalSensor.  Defaults to the GreenPlus target in that case.
-Add GridWorldColab.onnx file, trained and generated with the colab.

* Upgrade DQN GridWorld Colab to produce model that can work with (modified) GridWorld Scene.
-permute observation images from NHWC to NCHW right after env_step.  Everything following is NCHW.
-update input_shape indexes and remove equivalent permute from the VisualQNetwork
-fix reference to global qnet inside generate_trajectories (use the passed in version)
-create wrapper network to add required constants and dummy input masks required by the
 runtime inference (Barracuda)
-export the wrapped network to ONNX format compatible with Barracuda

* Add additional GridWorld scene called GridWorldColab that has the goal sensors removed (target is always green plus) and masks disabled.  The purpose of this is to have a scene compatible with the DQN GridWorld Colab example.

* Minor edit in Colab docs.

* Delete unnecessary .lighting file.

* Update changelog.

* Update colab/Colab_UnityEnvironment_2_Train.ipynb

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* Fix error in colab metadata name.

* Add suggested comments and fix incorrect parameter ordering.

* Update docs for Elo curriculum completion measure.

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
2022-01-04 13:27:11 -05:00
Henry Peteet 133a0e1463 Fix analytics error when compiling XBOX and PS5 (#5628)
* Add ENABLE_CLOUD_SERVICES_ANALYTICS Guards

To use analytics safely you must wrap usage with 
`#if ENABLE_CLOUD_SERVICES_ANALYTICS` 
See https://docs.unity3d.com/ScriptReference/Analytics.Analytics.html
2021-12-07 12:45:51 -05:00
Miguel Alonso Jr c05205749b Changelog cleanup. (#5627)
* Release cleanup for changelog

* Update CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
2021-12-02 15:05:46 -05:00
Maryam Honari 5a47de803e Deterministic actions python training (#5626)
* Progress on propagating the setting to the action model.

* Added the _sample_action logic and tests.

* Add information to the changelog.

* Prioritize the CLI over the configuration file.

* Update documentation for config file.

* CR refactor.

* Update docs/Training-Configuration-File.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
Update ml-agents/mlagents/trainers/settings.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
Update ml-agents/mlagents/trainers/cli_utils.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* Fix CR requests

* Add tests for discrete.

* Update ml-agents/mlagents/trainers/torch/distributions.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* Added more stable test.

* Return deterministic actions for training (#5615)

* Added more stable test.

* Fix the tests.

* Fix pre-commit

* Fix help line to pass precommit.

* support for deterministic inference in onnx (#5593)

* Init: actor.forward outputs separate deterministic actions

* changelog

* Renaming

* Add more tests

* Package changes to support deterministic inference (#5599)

* Init: actor.forward outputs separate deterministic actions

* fix tensor shape for discrete actions

* Add test and editor flag

- Add tests for deterministic sampling
- update editor and tooltips

* Reverting to "Deterministic Inference"

* dissect tests

* Update docs

* Update CHANGELOG.md

* Fix the deterministic showing up all the tiime (#5621)

Co-authored-by: Chingiz Mardanov <chingiz.mardanov@unity3d.com>
Co-authored-by: cmard <87716492+cmard@users.noreply.github.com>
2021-12-02 12:03:44 -05:00
Maryam Honari 0898f5c2e4 Revert "Deterministic actions python training (#5619)" (#5622)
This reverts commit 9ea962027d.
2021-11-18 17:37:22 -05:00
Maryam Honari 9ea962027d Deterministic actions python training (#5619)
* Progress on propagating the setting to the action model.

* Added the _sample_action logic and tests.

* Add information to the changelog.

* Prioritize the CLI over the configuration file.

* Update documentation for config file.

* CR refactor.

* Update docs/Training-Configuration-File.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Miguel Alonso Jr. <76960110+miguelalonsojr@users.noreply.github.com>
Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
Update ml-agents/mlagents/trainers/settings.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
Update ml-agents/mlagents/trainers/cli_utils.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* Fix CR requests

* Add tests for discrete.

* Update ml-agents/mlagents/trainers/torch/distributions.py

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

* Added more stable test.

* Return deterministic actions for training (#5615)

* Added more stable test.

* Fix the tests.

* Fix pre-commit

* Fix help line to pass precommit.

* support for deterministic inference in onnx (#5593)

* Init: actor.forward outputs separate deterministic actions

* changelog

* Renaming

* Add more tests

* Package changes to support deterministic inference (#5599)

* Init: actor.forward outputs separate deterministic actions

* fix tensor shape for discrete actions

* Add test and editor flag

- Add tests for deterministic sampling
- update editor and tooltips

* Reverting to "Deterministic Inference"

* dissect tests

* Update docs

* Update CHANGELOG.md

Co-authored-by: Chingiz Mardanov <chingiz.mardanov@unity3d.com>
Co-authored-by: cmard <87716492+cmard@users.noreply.github.com>
2021-11-18 09:56:12 -08:00
Miguel Alonso Jr 102f87b675 Fix for critic normalization bug (#5595)
* Added normalization to critic during training for poca, ppo, and sac.

* Fixed critic normalization bug. Added new tests to cover.

* Updated CHANGELOG.

* Fixed typo in test_trainers.py
2021-11-02 13:06:23 -04:00
Henry Peteet 88bc4e2acb Upgrade Barracuda to 2.3.1-preview (#5591)
* Upgrade to 2.3.1-preview
2021-10-27 11:15:24 -04:00
cmard 7eb8db4258 Method to return stacked observations (#5547)
* Method to return stacked observations

* Added testing and returning staked observation flat.

* Update the comment lines.

* Remove brainstorm commits.
2021-10-25 10:38:06 -04:00
cmard 3757c9ccca Fixing the analytics side-channel for curriculum learning. (#5586)
* Fixing the analytics side-channel for curriculum learning.

* Made a more robust test.

* Update the changelog.

* Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Maryam Honari <honari.m94@gmail.com>

Co-authored-by: Maryam Honari <honari.m94@gmail.com>
2021-10-18 10:06:33 -04:00
Miguel Alonso Jr dd0fca686d Develop add training area replicator (#5568)
* Added training area replicator to com.unity.ml-agents package.

* Added num_areas to Unity RL Initialization proto. Added cli and config file support for num_areas.

* Changed training area replicator to size grid automatically from number of areas.

* Added tests for the training area replicator.

* Added setup for tests for the training area replicator.

* Added comments and updated create tutorial for training area replicator.

* Updated CHANGELOG.

* Fixed some failing tests.

* Update com.unity.ml-agents/CHANGELOG.md

Co-authored-by: Henry Peteet <henry.peteet@unity3d.com>

* Update docs/Learning-Environment-Create-New.md

Co-authored-by: Henry Peteet <henry.peteet@unity3d.com>

* Update com.unity.ml-agents/Runtime/Areas/TrainingAreaReplicator.cs

Co-authored-by: Henry Peteet <henry.peteet@unity3d.com>

* Addressed CR comments.

Co-authored-by: Miguel Alonso Jr <miguelalonsojr>
Co-authored-by: Henry Peteet <henry.peteet@unity3d.com>
2021-10-13 09:28:10 -04:00
Henry Peteet c0b3291c05 Restart crashed Unity environments (#5553)
### Change(s)

Update the SubprocessEnvManager to restart workers when the underlying Unity environments crash. 
When a worker receives an ENV_EXITED signal it will now:

1. Record all failures coming through the step queue and drop all other messages.
2. Purge any pending trajectories as they may belong to a crashed worker or be corrupted.
3. Restart all failed workers (up to a configurable limit)

This behavior can be limited via a rate limit, max lifetime limit, or both. The configuration options for both are shown below with their default values. 

⚠️  Each of these options applies to a single environment, if num_envs > 1 then the limit will apply separately to each replica (num_envs = 2 will spawn 2 Unity environments which can each be restarted 10 times).

```yaml
env_settings:
  # Can restart 10 times over the lifetime of the experiment.
  max_lifetime_restarts: 10
  # Rate limit of 1 failure per 60s
  restarts_rate_limit_n: 1
  restarts_rate_limit_period_s: 60
```

They can of course be passed via CLI arguments as well

```bash
--max-lifetime-restarts
--restarts-rate-limit-n
--restarts-rate-limit-period-s
```

### Disabling this feature
* Rate limiting can be turned off by setting `--restarts-rate-limit-n=-1`
* Lifetime limiting can be turned off by setting `--max-lifetime-restarts=-1`
2021-10-07 10:10:20 -07:00
Jason Bowman 0a596c2052 Harden user PII protection logic and extend TrainingAnalytics to expose detailed configuration parameters. (#5512)
* Hash128 is not a cryptographic hash, replace with HMAC-SHA256.

* Extend TrainingAnalytics side channel to expose configuration details

* Change member function scopes and hash demo_paths

* Extract tbiEvent hashing method and add test coverage
2021-10-05 12:34:03 -07:00
Miguel Alonso Jr a93a977865 Feature/mla 2205 separate schedule lr beta epsilon (#5538)
* Added initial (untested) support for separating schedule for beta, LR, and epsilon.

* Added support for beta and epsilon schedule in test config conversion

* Updated docs. Set epsilon to be linear by default.

* Updated configs to add beta and epsilon schedule where appropriate.

* Addressed CR change requests.

* Minor update.

* Updated docs.

* Added changes to CHANGELOG.

* Updated CHANGELOG.

* Fixed typo in Training-Configuration-File.md

* Reverted config changes to remove beta and epsilon schedules.

* mypy error fixed from pre-commit.

* Fixed a bug that was causing a settings test to fail.

* Addressed CR comments.

Co-authored-by: Miguel Alonso Jr <miguel.alonso@miguel.alonso-00MM>
Co-authored-by: Miguel Alonso Jr <miguelalonsojr>
2021-09-30 12:06:29 -04:00
Vincent-Pierre BERGES 8738e8067d Custom trainer editor analytics (#5511)
* Custom trainer editor analytics
* inherit the default_training_analytics_side_channel
2021-09-24 15:58:43 -07:00
andrewcoh 9b74c7348a Fix VAIL (#5546) 2021-09-23 15:31:24 -04:00