From 130d6113ecc426748623394b56cafc81d7facd60 Mon Sep 17 00:00:00 2001 From: Vincent-Pierre BERGES Date: Thu, 23 Jul 2020 16:31:33 -0700 Subject: [PATCH 1/6] [bugfix] summary writer no longer crashes if Hyperparameters could not be written (#4265) * Bug fix, returnning an empty string in case of error breaks the summary writter * addressing comments --- ml-agents/mlagents/trainers/stats.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ml-agents/mlagents/trainers/stats.py b/ml-agents/mlagents/trainers/stats.py index c8a0a394b6..f953d1abd4 100644 --- a/ml-agents/mlagents/trainers/stats.py +++ b/ml-agents/mlagents/trainers/stats.py @@ -1,6 +1,6 @@ from collections import defaultdict from enum import Enum -from typing import List, Dict, NamedTuple, Any +from typing import List, Dict, NamedTuple, Any, Optional import numpy as np import abc import csv @@ -211,11 +211,14 @@ def add_property( ) -> None: if property_type == StatsPropertyType.HYPERPARAMETERS: assert isinstance(value, dict) - text = self._dict_to_tensorboard("Hyperparameters", value) + summary = self._dict_to_tensorboard("Hyperparameters", value) self._maybe_create_summary_writer(category) - self.summary_writers[category].add_summary(text, 0) + if summary is not None: + self.summary_writers[category].add_summary(summary, 0) - def _dict_to_tensorboard(self, name: str, input_dict: Dict[str, Any]) -> str: + def _dict_to_tensorboard( + self, name: str, input_dict: Dict[str, Any] + ) -> Optional[bytes]: """ Convert a dict to a Tensorboard-encoded string. :param name: The name of the text. @@ -232,8 +235,10 @@ def _dict_to_tensorboard(self, name: str, input_dict: Dict[str, Any]) -> str: s = sess.run(s_op) return s except Exception: - logger.warning("Could not write text summary for Tensorboard.") - return "" + logger.warning( + f"Could not write {name} summary for Tensorboard: {input_dict}" + ) + return None class CSVWriter(StatsWriter): From d495cc3e18f3762604ff3a921dcf3fc6ac700b72 Mon Sep 17 00:00:00 2001 From: andrewcoh <54679309+andrewcoh@users.noreply.github.com> Date: Mon, 27 Jul 2020 13:43:46 -0700 Subject: [PATCH 2/6] Reduce numpy version in ml-agents-envs setup (#4274) --- ml-agents-envs/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents-envs/setup.py b/ml-agents-envs/setup.py index eb8e8af0d2..91165324b1 100644 --- a/ml-agents-envs/setup.py +++ b/ml-agents-envs/setup.py @@ -48,7 +48,7 @@ def run(self): install_requires=[ "cloudpickle", "grpcio>=1.11.0", - "numpy>=1.14.1,<2.0", + "numpy>=1.14.1,<1.19.0", "Pillow>=4.2.1", "protobuf>=3.6", "pyyaml>=3.1.0", From 9f41ae4233925f0a4e66b443d0df738f53d3bfb7 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Wed, 29 Jul 2020 16:10:13 -0700 Subject: [PATCH 3/6] Fix lesson incrementing (#4279) --- .../trainers/environment_parameter_manager.py | 2 +- ml-agents/mlagents/trainers/exception.py | 8 +++ ml-agents/mlagents/trainers/settings.py | 12 +++- .../trainers/tests/test_env_param_manager.py | 64 ++++++++++++++++++- 4 files changed, 82 insertions(+), 4 deletions(-) diff --git a/ml-agents/mlagents/trainers/environment_parameter_manager.py b/ml-agents/mlagents/trainers/environment_parameter_manager.py index 232dd0fb83..448bc2c28d 100644 --- a/ml-agents/mlagents/trainers/environment_parameter_manager.py +++ b/ml-agents/mlagents/trainers/environment_parameter_manager.py @@ -131,7 +131,7 @@ def update_lessons( lesson = settings.curriculum[lesson_num] if ( lesson.completion_criteria is not None - and len(settings.curriculum) > lesson_num + and len(settings.curriculum) > lesson_num + 1 ): behavior_to_consider = lesson.completion_criteria.behavior if behavior_to_consider in trainer_steps: diff --git a/ml-agents/mlagents/trainers/exception.py b/ml-agents/mlagents/trainers/exception.py index a2a77a60b2..3c0742bcec 100644 --- a/ml-agents/mlagents/trainers/exception.py +++ b/ml-agents/mlagents/trainers/exception.py @@ -19,6 +19,14 @@ class TrainerConfigError(Exception): pass +class TrainerConfigWarning(Warning): + """ + Any warning related to the configuration of trainers in the ML-Agents Toolkit. + """ + + pass + + class CurriculumError(TrainerError): """ Any error related to training with a curriculum. diff --git a/ml-agents/mlagents/trainers/settings.py b/ml-agents/mlagents/trainers/settings.py index 9b75496ffc..bddfcd097d 100644 --- a/ml-agents/mlagents/trainers/settings.py +++ b/ml-agents/mlagents/trainers/settings.py @@ -1,3 +1,5 @@ +import warnings + import attr import cattr from typing import Dict, Optional, List, Any, DefaultDict, Mapping, Tuple, Union @@ -10,7 +12,7 @@ from mlagents.trainers.cli_utils import StoreConfigFile, DetectDefault, parser from mlagents.trainers.cli_utils import load_config -from mlagents.trainers.exception import TrainerConfigError +from mlagents.trainers.exception import TrainerConfigError, TrainerConfigWarning from mlagents.trainers.models import ScheduleType, EncoderType from mlagents_envs import logging_util @@ -433,7 +435,7 @@ class EnvironmentParameterSettings: def _check_lesson_chain(lessons, parameter_name): """ Ensures that when using curriculum, all non-terminal lessons have a valid - CompletionCriteria + CompletionCriteria, and that the terminal lesson does not contain a CompletionCriteria. """ num_lessons = len(lessons) for index, lesson in enumerate(lessons): @@ -441,6 +443,12 @@ def _check_lesson_chain(lessons, parameter_name): raise TrainerConfigError( f"A non-terminal lesson does not have a completion_criteria for {parameter_name}." ) + if index == num_lessons - 1 and lesson.completion_criteria is not None: + warnings.warn( + f"Your final lesson definition contains completion_criteria for {parameter_name}." + f"It will be ignored.", + TrainerConfigWarning, + ) @staticmethod def structure(d: Mapping, t: type) -> Dict[str, "EnvironmentParameterSettings"]: diff --git a/ml-agents/mlagents/trainers/tests/test_env_param_manager.py b/ml-agents/mlagents/trainers/tests/test_env_param_manager.py index b8fb92e15e..aea072617c 100644 --- a/ml-agents/mlagents/trainers/tests/test_env_param_manager.py +++ b/ml-agents/mlagents/trainers/tests/test_env_param_manager.py @@ -2,7 +2,7 @@ import yaml -from mlagents.trainers.exception import TrainerConfigError +from mlagents.trainers.exception import TrainerConfigError, TrainerConfigWarning from mlagents.trainers.environment_parameter_manager import EnvironmentParameterManager from mlagents.trainers.settings import ( RunOptions, @@ -154,6 +154,41 @@ def test_curriculum_conversion(): """ +test_bad_curriculum_all_competion_criteria_config_yaml = """ +environment_parameters: + param_1: + curriculum: + - name: Lesson1 + completion_criteria: + measure: reward + behavior: fake_behavior + threshold: 30 + min_lesson_length: 100 + require_reset: true + value: 1 + - name: Lesson2 + completion_criteria: + measure: reward + behavior: fake_behavior + threshold: 30 + min_lesson_length: 100 + require_reset: true + value: 2 + - name: Lesson3 + completion_criteria: + measure: reward + behavior: fake_behavior + threshold: 30 + min_lesson_length: 100 + require_reset: true + value: + sampler_type: uniform + sampler_parameters: + min_value: 1 + max_value: 3 +""" + + def test_curriculum_raises_no_completion_criteria_conversion(): with pytest.raises(TrainerConfigError): RunOptions.from_dict( @@ -161,6 +196,33 @@ def test_curriculum_raises_no_completion_criteria_conversion(): ) +def test_curriculum_raises_all_completion_criteria_conversion(): + with pytest.warns(TrainerConfigWarning): + run_options = RunOptions.from_dict( + yaml.safe_load(test_bad_curriculum_all_competion_criteria_config_yaml) + ) + + param_manager = EnvironmentParameterManager( + run_options.environment_parameters, 1337, False + ) + assert param_manager.update_lessons( + trainer_steps={"fake_behavior": 500}, + trainer_max_steps={"fake_behavior": 1000}, + trainer_reward_buffer={"fake_behavior": [1000] * 101}, + ) == (True, True) + assert param_manager.update_lessons( + trainer_steps={"fake_behavior": 500}, + trainer_max_steps={"fake_behavior": 1000}, + trainer_reward_buffer={"fake_behavior": [1000] * 101}, + ) == (True, True) + assert param_manager.update_lessons( + trainer_steps={"fake_behavior": 500}, + trainer_max_steps={"fake_behavior": 1000}, + trainer_reward_buffer={"fake_behavior": [1000] * 101}, + ) == (False, False) + assert param_manager.get_current_lesson_number() == {"param_1": 2} + + test_everything_config_yaml = """ environment_parameters: param_1: From 07e62ad91b5e097521380df71618c9146c726dbb Mon Sep 17 00:00:00 2001 From: Chris Elion Date: Thu, 30 Jul 2020 20:42:23 -0700 Subject: [PATCH 4/6] cherrypick yamato fixes to release_5_branch (#4290) --- .yamato/com.unity.ml-agents-performance.yml | 2 +- .yamato/com.unity.ml-agents-test.yml | 2 +- .yamato/gym-interface-test.yml | 14 +++++++------- .yamato/protobuf-generation-test.yml | 5 ++--- .yamato/python-ll-api-test.yml | 14 +++++++------- .yamato/standalone-build-test.yml | 2 +- .yamato/training-int-tests.yml | 2 +- ml-agents/tests/yamato/yamato_utils.py | 3 ++- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.yamato/com.unity.ml-agents-performance.yml b/.yamato/com.unity.ml-agents-performance.yml index 62351afae9..f79e85d56a 100644 --- a/.yamato/com.unity.ml-agents-performance.yml +++ b/.yamato/com.unity.ml-agents-performance.yml @@ -12,7 +12,7 @@ Run_Mac_Perfomance_Tests{{ editor.version }}: variables: UNITY_VERSION: {{ editor.version }} commands: - - python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple + - python -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast - curl -s https://artifactory.internal.unity3d.com/core-automation/tools/utr-standalone/utr --output utr - chmod +x ./utr diff --git a/.yamato/com.unity.ml-agents-test.yml b/.yamato/com.unity.ml-agents-test.yml index a4729281c6..9f9fe2eeb1 100644 --- a/.yamato/com.unity.ml-agents-test.yml +++ b/.yamato/com.unity.ml-agents-test.yml @@ -104,7 +104,7 @@ test_{{ package.name }}_{{ platform.name }}_trunk: image: {{ platform.image }} flavor: {{ platform.flavor}} commands: - - python -m pip install unity-downloader-cli --extra-index-url https://artifactory.eu-cph-1.unityops.net/api/pypi/common-python/simple + - python -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade - unity-downloader-cli -u trunk -c editor --wait --fast - npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm - upm-ci project test -u {{ editor.version }} --project-path Project --package-filter {{ package.name }} {{ editor.coverageOptions }} diff --git a/.yamato/gym-interface-test.yml b/.yamato/gym-interface-test.yml index a5fdcfdfc9..fd2aa8a09c 100644 --- a/.yamato/gym-interface-test.yml +++ b/.yamato/gym-interface-test.yml @@ -11,7 +11,7 @@ test_gym_interface_{{ editor.version }}: variables: UNITY_VERSION: {{ editor.version }} commands: - - pip install pyyaml + - pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - python -u -m ml-agents.tests.yamato.setup_venv - ./venv/bin/python ml-agents/tests/yamato/scripts/run_gym.py --env=artifacts/testPlayer-Basic dependencies: @@ -21,12 +21,12 @@ test_gym_interface_{{ editor.version }}: expression: | (pull_request.target eq "master" OR pull_request.target match "release.+") AND - NOT pull_request.draft AND - (pull_request.changes.any match "com.unity.ml-agents/**" OR - pull_request.changes.any match "Project/**" OR - pull_request.changes.any match "ml-agents/**" OR - pull_request.changes.any match "ml-agents-envs/**" OR - pull_request.changes.any match "gym-unity/**" OR + NOT pull_request.draft AND + (pull_request.changes.any match "com.unity.ml-agents/**" OR + pull_request.changes.any match "Project/**" OR + pull_request.changes.any match "ml-agents/**" OR + pull_request.changes.any match "ml-agents-envs/**" OR + pull_request.changes.any match "gym-unity/**" OR pull_request.changes.any match ".yamato/gym-interface-test.yml") AND NOT pull_request.changes.all match "**/*.md" {% endfor %} diff --git a/.yamato/protobuf-generation-test.yml b/.yamato/protobuf-generation-test.yml index 96f190775d..e91a2ddf89 100644 --- a/.yamato/protobuf-generation-test.yml +++ b/.yamato/protobuf-generation-test.yml @@ -13,9 +13,8 @@ test_mac_protobuf_generation: nuget install Grpc.Tools -Version $GRPC_VERSION -OutputDirectory protobuf-definitions/ python3 -m venv venv . venv/bin/activate - pip install --upgrade pip - pip install grpcio-tools==1.13.0 --progress-bar=off - pip install mypy-protobuf==1.16.0 --progress-bar=off + pip install --upgrade pip --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple + pip install grpcio==1.28.1 grpcio-tools==1.13.0 protobuf==3.11.3 six==1.14.0 mypy-protobuf==1.16.0 --progress-bar=off --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple cd protobuf-definitions chmod +x Grpc.Tools.$GRPC_VERSION/tools/macosx_x64/protoc chmod +x Grpc.Tools.$GRPC_VERSION/tools/macosx_x64/grpc_csharp_plugin diff --git a/.yamato/python-ll-api-test.yml b/.yamato/python-ll-api-test.yml index aa816ec68a..983597313e 100644 --- a/.yamato/python-ll-api-test.yml +++ b/.yamato/python-ll-api-test.yml @@ -11,9 +11,9 @@ test_mac_ll_api_{{ editor.version }}: variables: UNITY_VERSION: {{ editor.version }} commands: - - pip install pyyaml + - pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - python -u -m ml-agents.tests.yamato.setup_venv - - ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py + - ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py - ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Basic - ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-WallJump - ./venv/bin/python ml-agents/tests/yamato/scripts/run_llapi.py --env=artifacts/testPlayer-Bouncer @@ -24,11 +24,11 @@ test_mac_ll_api_{{ editor.version }}: expression: | (pull_request.target eq "master" OR pull_request.target match "release.+") AND - NOT pull_request.draft AND - (pull_request.changes.any match "com.unity.ml-agents/**" OR - pull_request.changes.any match "Project/**" OR - pull_request.changes.any match "ml-agents/**" OR - pull_request.changes.any match "ml-agents-envs/**" OR + NOT pull_request.draft AND + (pull_request.changes.any match "com.unity.ml-agents/**" OR + pull_request.changes.any match "Project/**" OR + pull_request.changes.any match "ml-agents/**" OR + pull_request.changes.any match "ml-agents-envs/**" OR pull_request.changes.any match ".yamato/python-ll-api-test.yml") AND NOT pull_request.changes.all match "**/*.md" {% endfor %} diff --git a/.yamato/standalone-build-test.yml b/.yamato/standalone-build-test.yml index a769ff9686..3077bff8bf 100644 --- a/.yamato/standalone-build-test.yml +++ b/.yamato/standalone-build-test.yml @@ -12,7 +12,7 @@ test_mac_standalone_{{ editor.version }}: variables: UNITY_VERSION: {{ editor.version }} commands: - - pip install pyyaml + - pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - python -u -m ml-agents.tests.yamato.standalone_build_tests - python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity - python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity diff --git a/.yamato/training-int-tests.yml b/.yamato/training-int-tests.yml index b7839bb0f6..05f79e5cb2 100644 --- a/.yamato/training-int-tests.yml +++ b/.yamato/training-int-tests.yml @@ -12,7 +12,7 @@ test_mac_training_int_{{ editor.version }}: variables: UNITY_VERSION: {{ editor.version }} commands: - - pip install pyyaml + - pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple - python -u -m ml-agents.tests.yamato.training_int_tests # Backwards-compatibility tests. # If we make a breaking change to the communication protocol, these will need diff --git a/ml-agents/tests/yamato/yamato_utils.py b/ml-agents/tests/yamato/yamato_utils.py index 611dac7f17..7784687392 100644 --- a/ml-agents/tests/yamato/yamato_utils.py +++ b/ml-agents/tests/yamato/yamato_utils.py @@ -136,8 +136,9 @@ def init_venv( if extra_packages: pip_commands += extra_packages for cmd in pip_commands: + pip_index_url = "--index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple" subprocess.check_call( - f"source {venv_path}/bin/activate; python -m pip install -q {cmd}", + f"source {venv_path}/bin/activate; python -m pip install -q {cmd} {pip_index_url}", shell=True, ) return venv_path From 4dd9dc5870def819bc5566850fc732489cebb0e6 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Fri, 31 Jul 2020 10:09:14 -0700 Subject: [PATCH 5/6] Update versions and release strings (#4289) Co-authored-by: Chris Elion --- README.md | 12 ++++----- com.unity.ml-agents/CHANGELOG.md | 4 +-- .../Documentation~/com.unity.ml-agents.md | 2 +- com.unity.ml-agents/Runtime/Academy.cs | 4 +-- com.unity.ml-agents/Runtime/Agent.cs | 26 +++++++++---------- .../Demonstrations/DemonstrationRecorder.cs | 2 +- .../Runtime/DiscreteActionMasker.cs | 2 +- docs/Installation-Anaconda-Windows.md | 4 +-- docs/Installation.md | 6 ++--- docs/Training-on-Amazon-Web-Service.md | 2 +- gym-unity/gym_unity/__init__.py | 4 +-- ml-agents-envs/mlagents_envs/__init__.py | 4 +-- ml-agents/mlagents/trainers/__init__.py | 4 +-- utils/make_readme_table.py | 1 + 14 files changed, 38 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 1a7d940249..a771066fdb 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # Unity ML-Agents Toolkit -[![docs badge](https://img.shields.io/badge/docs-reference-blue.svg)](https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/) +[![docs badge](https://img.shields.io/badge/docs-reference-blue.svg)](https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/) [![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE) @@ -48,8 +48,8 @@ descriptions of all these features. ## Releases & Documentation -**Our latest, stable release is `Release 4`. Click -[here](https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/Readme.md) +**Our latest, stable release is `Release 5`. Click +[here](https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/Readme.md) to get started with the latest release of ML-Agents.** The table below lists all our releases, including our `master` branch which is @@ -64,16 +64,14 @@ under active development and may be unstable. A few helpful guidelines: instructions specific to each release. Remember to always use the documentation that corresponds to the release version you're using. -| **Version** | **Release Date** | **Source** | **Documentation** | **Download** | -|:-------:|:------:|:-------------:|:-------:|:------------:| | **master (unstable)** | -- | [source](https://github.com/Unity-Technologies/ml-agents/tree/master) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/master/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/master.zip) | -| **Release 4** | **July 15, 2020** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_4)** | **[docs](https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/Readme.md)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_4.zip)** | +| **Release 5** | **July 31, 2020** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_5)** | **[docs](https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/Readme.md)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_5.zip)** | +| **Release 4** | July 15, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/release_4) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/release_4.zip) | | **Release 3** | June 10, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/release_3) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/release_3_docs/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/release_3.zip) | | **Release 2** | May 20, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/release_2) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/release_2_docs/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/release_2.zip) | | **Release 1** | April 30, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/release_1) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/release_1_docs/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/release_1.zip) | | **0.15.1** | March 30, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.15.1/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.15.1.zip) | | **0.15.0** | March 18, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.15.0) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.15.0/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.15.0.zip) | -| **0.14.1** | February 26, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/0.14.1) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/0.14.1/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/0.14.1.zip) | ## Citation diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 537623242b..4f4e9f7e60 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -48,7 +48,7 @@ argument. (#4203) - `max_step` in the `TerminalStep` and `TerminalSteps` objects was renamed `interrupted`. - `beta` and `epsilon` in `PPO` are no longer decayed by default but follow the same schedule as learning rate. (#3940) - `get_behavior_names()` and `get_behavior_spec()` on UnityEnvironment were replaced by the `behavior_specs` property. (#3946) -- The first version of the Unity Environment Registry (Experimental) has been released. More information [here](https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Unity-Environment-Registry.md)(#3967) +- The first version of the Unity Environment Registry (Experimental) has been released. More information [here](https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Unity-Environment-Registry.md)(#3967) - `use_visual` and `allow_multiple_visual_obs` in the `UnityToGymWrapper` constructor were replaced by `allow_multiple_obs` which allows one or more visual observations and vector observations to be used simultaneously. (#3981) Thank you @shakenes ! @@ -56,7 +56,7 @@ vector observations to be used simultaneously. (#3981) Thank you @shakenes ! into the main training configuration file. Note that this means training configuration files are now environment-specific. (#3791) - The format for trainer configuration has changed, and the "default" behavior has been deprecated. - See the [Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Migrating.md) for more details. (#3936) + See the [Migration Guide](https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Migrating.md) for more details. (#3936) - Training artifacts (trained models, summaries) are now found in the `results/` directory. (#3829) - When using Curriculum, the current lesson will resume if training is quit and resumed. As such, diff --git a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md index 227a1eb2e7..4f79cde27c 100755 --- a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md +++ b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md @@ -114,7 +114,7 @@ a number of ways to [connect with us] including our [ML-Agents Forum]. [unity ML-Agents Toolkit]: https://github.com/Unity-Technologies/ml-agents [unity inference engine]: https://docs.unity3d.com/Packages/com.unity.barracuda@latest/index.html [package manager documentation]: https://docs.unity3d.com/Manual/upm-ui-install.html -[installation instructions]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Installation.md +[installation instructions]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Installation.md [github repository]: https://github.com/Unity-Technologies/ml-agents [python package]: https://github.com/Unity-Technologies/ml-agents [execution order of event functions]: https://docs.unity3d.com/Manual/ExecutionOrder.html diff --git a/com.unity.ml-agents/Runtime/Academy.cs b/com.unity.ml-agents/Runtime/Academy.cs index c2bf998807..1005e87393 100644 --- a/com.unity.ml-agents/Runtime/Academy.cs +++ b/com.unity.ml-agents/Runtime/Academy.cs @@ -19,7 +19,7 @@ * API. For more information on each of these entities, in addition to how to * set-up a learning environment and train the behavior of characters in a * Unity scene, please browse our documentation pages on GitHub: - * https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/ + * https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/ */ namespace Unity.MLAgents @@ -51,7 +51,7 @@ void FixedUpdate() /// fall back to inference or heuristic decisions. (You can also set agents to always use /// inference or heuristics.) /// - [HelpURL("https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/" + + [HelpURL("https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/" + "docs/Learning-Environment-Design.md")] public class Academy : IDisposable { diff --git a/com.unity.ml-agents/Runtime/Agent.cs b/com.unity.ml-agents/Runtime/Agent.cs index a12f1761d8..cad4575f0b 100644 --- a/com.unity.ml-agents/Runtime/Agent.cs +++ b/com.unity.ml-agents/Runtime/Agent.cs @@ -145,13 +145,13 @@ internal struct AgentAction /// [OnDisable()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnDisable.html] /// [OnBeforeSerialize()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnBeforeSerialize.html /// [OnAfterSerialize()]: https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnAfterSerialize.html - /// [Agents]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md - /// [Reinforcement Learning in Unity]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design.md + /// [Agents]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md + /// [Reinforcement Learning in Unity]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design.md /// [Unity ML-Agents Toolkit]: https://github.com/Unity-Technologies/ml-agents - /// [Unity ML-Agents Toolkit manual]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Readme.md + /// [Unity ML-Agents Toolkit manual]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Readme.md /// /// - [HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/" + + [HelpURL("https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/" + "docs/Learning-Environment-Design-Agents.md")] [Serializable] [RequireComponent(typeof(BehaviorParameters))] @@ -603,8 +603,8 @@ public int CompletedEpisodes /// for information about mixing reward signals from curiosity and Generative Adversarial /// Imitation Learning (GAIL) with rewards supplied through this method. /// - /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#rewards - /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals + /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#rewards + /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals /// /// The new value of the reward. public void SetReward(float reward) @@ -633,8 +633,8 @@ public void SetReward(float reward) /// for information about mixing reward signals from curiosity and Generative Adversarial /// Imitation Learning (GAIL) with rewards supplied through this method. /// - /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#rewards - /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals + /// [Agents - Rewards]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#rewards + /// [Reward Signals]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/ML-Agents-Overview.md#a-quick-note-on-reward-signals /// /// Incremental reward value. public void AddReward(float increment) @@ -790,8 +790,8 @@ public virtual void Initialize() {} /// implementing a simple heuristic function can aid in debugging agent actions and interactions /// with its environment. /// - /// [Demonstration Recorder]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#recording-demonstrations - /// [Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#actions + /// [Demonstration Recorder]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#recording-demonstrations + /// [Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#actions /// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html /// /// @@ -996,7 +996,7 @@ void ResetSensors() /// For more information about observations, see [Observations and Sensors]. /// /// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html - /// [Observations and Sensors]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#observations-and-sensors + /// [Observations and Sensors]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#observations-and-sensors /// public virtual void CollectObservations(VectorSensor sensor) { @@ -1027,7 +1027,7 @@ public ReadOnlyCollection GetObservations() /// /// See [Agents - Actions] for more information on masking actions. /// - /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#actions + /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#actions /// /// public virtual void CollectDiscreteActionMasks(DiscreteActionMasker actionMasker) @@ -1097,7 +1097,7 @@ public virtual void CollectDiscreteActionMasks(DiscreteActionMasker actionMasker /// /// For more information about implementing agent actions see [Agents - Actions]. /// - /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#actions + /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#actions /// /// /// An array containing the action vector. The length of the array is specified diff --git a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs index 5017149e1c..f10c1a29e8 100644 --- a/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs +++ b/com.unity.ml-agents/Runtime/Demonstrations/DemonstrationRecorder.cs @@ -19,7 +19,7 @@ namespace Unity.MLAgents.Demonstrations /// See [Imitation Learning - Recording Demonstrations] for more information. /// /// [GameObject]: https://docs.unity3d.com/Manual/GameObjects.html - /// [Imitation Learning - Recording Demonstrations]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs//Learning-Environment-Design-Agents.md#recording-demonstrations + /// [Imitation Learning - Recording Demonstrations]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs//Learning-Environment-Design-Agents.md#recording-demonstrations /// [RequireComponent(typeof(Agent))] [AddComponentMenu("ML Agents/Demonstration Recorder", (int)MenuGroup.Default)] diff --git a/com.unity.ml-agents/Runtime/DiscreteActionMasker.cs b/com.unity.ml-agents/Runtime/DiscreteActionMasker.cs index e8c8538640..1a9b322a98 100644 --- a/com.unity.ml-agents/Runtime/DiscreteActionMasker.cs +++ b/com.unity.ml-agents/Runtime/DiscreteActionMasker.cs @@ -40,7 +40,7 @@ internal DiscreteActionMasker(BrainParameters brainParameters) /// /// See [Agents - Actions] for more information on masking actions. /// - /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_4_docs/docs/Learning-Environment-Design-Agents.md#actions + /// [Agents - Actions]: https://github.com/Unity-Technologies/ml-agents/blob/release_5_docs/docs/Learning-Environment-Design-Agents.md#actions /// /// The branch for which the actions will be masked. /// The indices of the masked actions. diff --git a/docs/Installation-Anaconda-Windows.md b/docs/Installation-Anaconda-Windows.md index c4c824c797..7ca0a1d63c 100644 --- a/docs/Installation-Anaconda-Windows.md +++ b/docs/Installation-Anaconda-Windows.md @@ -123,10 +123,10 @@ commands in an Anaconda Prompt _(if you open a new prompt, be sure to activate the ml-agents Conda environment by typing `activate ml-agents`)_: ```sh -git clone --branch release_4 https://github.com/Unity-Technologies/ml-agents.git +git clone --branch release_5 https://github.com/Unity-Technologies/ml-agents.git ``` -The `--branch release_4` option will switch to the tag of the latest stable +The `--branch release_5` option will switch to the tag of the latest stable release. Omitting that will get the `master` branch which is potentially unstable. diff --git a/docs/Installation.md b/docs/Installation.md index a3c1f41c38..917d8994e9 100644 --- a/docs/Installation.md +++ b/docs/Installation.md @@ -58,10 +58,10 @@ example environments and training configurations to experiment with them (some of our tutorials / guides assume you have access to our example environments). ```sh -git clone --branch release_4 https://github.com/Unity-Technologies/ml-agents.git +git clone --branch release_5 https://github.com/Unity-Technologies/ml-agents.git ``` -The `--branch release_4` option will switch to the tag of the latest stable +The `--branch release_5` option will switch to the tag of the latest stable release. Omitting that will get the `master` branch which is potentially unstable. @@ -69,7 +69,7 @@ unstable. You will need to clone the repository if you plan to modify or extend the ML-Agents Toolkit for your purposes. If you plan to contribute those changes -back, make sure to clone the `master` branch (by omitting `--branch release_4` +back, make sure to clone the `master` branch (by omitting `--branch release_5` from the command above). See our [Contributions Guidelines](../com.unity.ml-agents/CONTRIBUTING.md) for more information on contributing to the ML-Agents Toolkit. diff --git a/docs/Training-on-Amazon-Web-Service.md b/docs/Training-on-Amazon-Web-Service.md index b41e0006f7..bc78e2a28b 100644 --- a/docs/Training-on-Amazon-Web-Service.md +++ b/docs/Training-on-Amazon-Web-Service.md @@ -69,7 +69,7 @@ After launching your EC2 instance using the ami and ssh into it: 2. Clone the ML-Agents repo and install the required Python packages ```sh - git clone --branch release_4 https://github.com/Unity-Technologies/ml-agents.git + git clone --branch release_5 https://github.com/Unity-Technologies/ml-agents.git cd ml-agents/ml-agents/ pip3 install -e . ``` diff --git a/gym-unity/gym_unity/__init__.py b/gym-unity/gym_unity/__init__.py index 742fc90b4d..5d5c8be1eb 100644 --- a/gym-unity/gym_unity/__init__.py +++ b/gym-unity/gym_unity/__init__.py @@ -1,5 +1,5 @@ # Version of the library that will be used to upload to pypi -__version__ = "0.18.0" +__version__ = "0.18.1" # Git tag that will be checked to determine whether to trigger upload to pypi -__release_tag__ = "release_4" +__release_tag__ = "release_5" diff --git a/ml-agents-envs/mlagents_envs/__init__.py b/ml-agents-envs/mlagents_envs/__init__.py index 742fc90b4d..5d5c8be1eb 100644 --- a/ml-agents-envs/mlagents_envs/__init__.py +++ b/ml-agents-envs/mlagents_envs/__init__.py @@ -1,5 +1,5 @@ # Version of the library that will be used to upload to pypi -__version__ = "0.18.0" +__version__ = "0.18.1" # Git tag that will be checked to determine whether to trigger upload to pypi -__release_tag__ = "release_4" +__release_tag__ = "release_5" diff --git a/ml-agents/mlagents/trainers/__init__.py b/ml-agents/mlagents/trainers/__init__.py index 742fc90b4d..5d5c8be1eb 100644 --- a/ml-agents/mlagents/trainers/__init__.py +++ b/ml-agents/mlagents/trainers/__init__.py @@ -1,5 +1,5 @@ # Version of the library that will be used to upload to pypi -__version__ = "0.18.0" +__version__ = "0.18.1" # Git tag that will be checked to determine whether to trigger upload to pypi -__release_tag__ = "release_4" +__release_tag__ = "release_5" diff --git a/utils/make_readme_table.py b/utils/make_readme_table.py index 757ac6a118..208ae61cad 100644 --- a/utils/make_readme_table.py +++ b/utils/make_readme_table.py @@ -70,6 +70,7 @@ def display_name(self) -> str: ReleaseInfo("release_2", "1.0.2", "0.16.1", "May 20, 2020"), ReleaseInfo("release_3", "1.1.0", "0.17.0", "June 10, 2020"), ReleaseInfo("release_4", "1.2.0", "0.18.0", "July 15, 2020"), + ReleaseInfo("release_5", "1.2.1", "0.18.1", "July 31, 2020"), ] MAX_DAYS = 150 # do not print releases older than this many days From 91465cdc59555b6fadeb5eb3fa3831360ea19274 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Fri, 31 Jul 2020 10:13:20 -0700 Subject: [PATCH 6/6] Fix broken release table --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a771066fdb..6fc6a3af4b 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,8 @@ under active development and may be unstable. A few helpful guidelines: instructions specific to each release. Remember to always use the documentation that corresponds to the release version you're using. +| **Version** | **Release Date** | **Source** | **Documentation** | **Download** | +|:-------:|:------:|:-------------:|:-------:|:------------:| | **master (unstable)** | -- | [source](https://github.com/Unity-Technologies/ml-agents/tree/master) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/master/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/master.zip) | | **Release 5** | **July 31, 2020** | **[source](https://github.com/Unity-Technologies/ml-agents/tree/release_5)** | **[docs](https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/Readme.md)** | **[download](https://github.com/Unity-Technologies/ml-agents/archive/release_5.zip)** | | **Release 4** | July 15, 2020 | [source](https://github.com/Unity-Technologies/ml-agents/tree/release_4) | [docs](https://github.com/Unity-Technologies/ml-agents/tree/release_4_docs/docs/Readme.md) | [download](https://github.com/Unity-Technologies/ml-agents/archive/release_4.zip) |