From 3b0a34b1b4e1b5032b5ffb335d861c8a9ac3f877 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Wed, 5 Sep 2018 15:36:03 -0700 Subject: [PATCH 1/3] Update API to version 5 --- UnitySDK/Assets/ML-Agents/Scripts/Academy.cs | 2 +- ml-agents/mlagents/envs/environment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs b/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs index 7b9b32f132..dc7db49223 100755 --- a/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs +++ b/UnitySDK/Assets/ML-Agents/Scripts/Academy.cs @@ -92,7 +92,7 @@ public EnvironmentConfiguration( "docs/Learning-Environment-Design-Academy.md")] public abstract class Academy : MonoBehaviour { - private const string kApiVersion = "API-4"; + private const string kApiVersion = "API-5"; // Fields provided in the Inspector diff --git a/ml-agents/mlagents/envs/environment.py b/ml-agents/mlagents/envs/environment.py index d729a3d652..51eab97b8d 100644 --- a/ml-agents/mlagents/envs/environment.py +++ b/ml-agents/mlagents/envs/environment.py @@ -43,7 +43,7 @@ def __init__(self, file_name=None, worker_id=0, atexit.register(self._close) self.port = base_port + worker_id self._buffer_size = 12000 - self._version_ = "API-4" + self._version_ = "API-5" self._loaded = False # If true, this means the environment was successfully loaded self.proc1 = None # The process that is started. If None, no process was started self.communicator = self.get_communicator(worker_id, base_port) From 0ee4f346c09466c12d9ffadb0b32ba16198cc0f9 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Wed, 5 Sep 2018 15:56:00 -0700 Subject: [PATCH 2/3] Update API in test --- ml-agents/tests/trainers/test_trainer_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents/tests/trainers/test_trainer_controller.py b/ml-agents/tests/trainers/test_trainer_controller.py index fb99e5ed38..d7e870b71f 100644 --- a/ml-agents/tests/trainers/test_trainer_controller.py +++ b/ml-agents/tests/trainers/test_trainer_controller.py @@ -22,7 +22,7 @@ def dummy_start(): "brainNames": ["RealFakeBrain"], "externalBrainNames": ["RealFakeBrain"], "logPath":"RealFakePath", - "apiNumber":"API-3", + "apiNumber":"API-5", "brainParameters": [{ "vectorObservationSize": 3, "numStackedVectorObservations" : 2, From 302e1985f87ee441fc2c92e81990d73de9ea5700 Mon Sep 17 00:00:00 2001 From: Arthur Juliani Date: Wed, 5 Sep 2018 16:02:30 -0700 Subject: [PATCH 3/3] Additional API change --- ml-agents/tests/mock_communicator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents/tests/mock_communicator.py b/ml-agents/tests/mock_communicator.py index 296cc20067..43365d77c0 100755 --- a/ml-agents/tests/mock_communicator.py +++ b/ml-agents/tests/mock_communicator.py @@ -39,7 +39,7 @@ def initialize(self, inputs: UnityInput) -> UnityOutput: ) rl_init = UnityRLInitializationOutput( name="RealFakeAcademy", - version="API-4", + version="API-5", log_path="", brain_parameters=[bp] )