diff --git a/DevProject/Packages/packages-lock.json b/DevProject/Packages/packages-lock.json index c56c909e94..ec3ab9abea 100644 --- a/DevProject/Packages/packages-lock.json +++ b/DevProject/Packages/packages-lock.json @@ -10,7 +10,7 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.burst": { - "version": "1.8.7", + "version": "1.8.10", "depth": 2, "source": "registry", "dependencies": { @@ -55,7 +55,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.sentis": "1.2.0-exp.2", + "com.unity.sentis": "1.3.0-pre.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" @@ -105,11 +105,11 @@ "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, "com.unity.sentis": { - "version": "1.2.0-exp.2", + "version": "1.3.0-pre.1", "depth": 1, "source": "registry", "dependencies": { - "com.unity.burst": "1.8.4", + "com.unity.burst": "1.8.10", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.imageconversion": "1.0.0" }, diff --git a/DevProject/ProjectSettings/EditorBuildSettings.asset b/DevProject/ProjectSettings/EditorBuildSettings.asset index 03daeda465..3a360cd788 100644 --- a/DevProject/ProjectSettings/EditorBuildSettings.asset +++ b/DevProject/ProjectSettings/EditorBuildSettings.asset @@ -9,5 +9,5 @@ EditorBuildSettings: path: Assets/ML-Agents/Scripts/Tests/Runtime/AcademyTest/AcademyStepperTestScene.unity guid: 9bafc50b1e55b43b2b1ae9620f1f8311 m_configObjects: - com.unity.ml-agents.settings: {fileID: 11400000, guid: e4ad406c716274fdfb58baafffa12dcd, + com.unity.ml-agents.settings: {fileID: 11400000, guid: 87b8aebb5aefd4643821361876570855, type: 2} diff --git a/Project/Packages/packages-lock.json b/Project/Packages/packages-lock.json index 14ce889ea4..2bfe2876bd 100644 --- a/Project/Packages/packages-lock.json +++ b/Project/Packages/packages-lock.json @@ -17,7 +17,7 @@ "url": "https://packages.unity.com" }, "com.unity.burst": { - "version": "1.8.7", + "version": "1.8.10", "depth": 2, "source": "registry", "dependencies": { @@ -72,7 +72,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.sentis": "1.2.0-exp.2", + "com.unity.sentis": "1.3.0-pre.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" @@ -104,11 +104,11 @@ "url": "https://packages.unity.com" }, "com.unity.sentis": { - "version": "1.2.0-exp.2", + "version": "1.3.0-pre.1", "depth": 1, "source": "registry", "dependencies": { - "com.unity.burst": "1.8.4", + "com.unity.burst": "1.8.10", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.imageconversion": "1.0.0" }, diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index d88eb41882..1af8571c56 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -9,11 +9,14 @@ and this project adheres to ## [Unreleased] ### Major Changes #### com.unity.ml-agents / com.unity.ml-agents.extensions (C#) +- Upgraded to Sentis 1.3.0-exp.2 (#6013) #### ml-agents / ml-agents-envs +- Upgraded to PyTorch 2.1.1 (#6013) ### Minor Changes #### com.unity.ml-agents / com.unity.ml-agents.extensions (C#) +- Added no-graphics-monitor (#6014) #### ml-agents / ml-agents-envs @@ -21,7 +24,7 @@ and this project adheres to #### com.unity.ml-agents / com.unity.ml-agents.extensions (C#) #### ml-agents / ml-agents-envs -- Bumped numpy version to >=1.21.2,<1.24.0 (#) +- Bumped numpy version to >=1.21.2,<1.24.0 (#5997) ## [3.0.0-exp.1] - 2023-10-09 ### Major Changes diff --git a/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll new file mode 100644 index 0000000000..6300f7dd62 Binary files /dev/null and b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll differ diff --git a/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll.meta b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll.meta new file mode 100644 index 0000000000..2a4bbcae23 --- /dev/null +++ b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.dll.meta @@ -0,0 +1,33 @@ +fileFormatVersion: 2 +guid: a730d5d5da5b947fa98116a36ecd017d +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb new file mode 100644 index 0000000000..287458a324 Binary files /dev/null and b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb differ diff --git a/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb.meta b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb.meta new file mode 100644 index 0000000000..f5f3de5bcc --- /dev/null +++ b/com.unity.ml-agents/Plugins/Google.Protobuf_Packed.pdb.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 680f3317ace1146aebdd9502150b2765 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/com.unity.ml-agents/Runtime/Timer.cs b/com.unity.ml-agents/Runtime/Timer.cs index f13b2819ce..7de390343f 100644 --- a/com.unity.ml-agents/Runtime/Timer.cs +++ b/com.unity.ml-agents/Runtime/Timer.cs @@ -79,7 +79,7 @@ public long CurrentTicks public double TotalSeconds { get { return CurrentTicks * s_TicksToSeconds; } - set { } // Serialization needs this, but unused. + set { } // Serialization needs this, but unused. } /// @@ -102,7 +102,7 @@ public double SelfSeconds var selfTicks = Mathf.Max(0, CurrentTicks - totalChildTicks); return selfTicks * s_TicksToSeconds; } - set { } // Serialization needs this, but unused. + set { } // Serialization needs this, but unused. } public IReadOnlyDictionary Children diff --git a/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef b/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef index 25d60133ff..a0ac715dbf 100755 --- a/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef +++ b/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef @@ -9,11 +9,11 @@ "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [ "System.IO.Abstractions.dll", - "Google.Protobuf.dll", - "Grpc.Core.dll" + "Grpc.Core.dll", + "Google.Protobuf_Packed.dll" ], "autoReferenced": true, "defineConstraints": [], diff --git a/com.unity.ml-agents/package.json b/com.unity.ml-agents/package.json index 364770efae..0c02132e71 100755 --- a/com.unity.ml-agents/package.json +++ b/com.unity.ml-agents/package.json @@ -5,7 +5,7 @@ "unity": "2022.3", "description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).", "dependencies": { - "com.unity.sentis": "1.2.0-exp.2", + "com.unity.sentis": "1.3.0-pre.2", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" diff --git a/ml-agents-envs/tests/test_envs.py b/ml-agents-envs/tests/test_envs.py index 138ac6d983..abcfdcac3f 100755 --- a/ml-agents-envs/tests/test_envs.py +++ b/ml-agents-envs/tests/test_envs.py @@ -1,3 +1,4 @@ +import os from unittest import mock import pytest @@ -53,11 +54,15 @@ def test_port_defaults( def test_log_file_path_is_set(mock_communicator, mock_launcher): mock_communicator.return_value = MockCommunicator() env = UnityEnvironment( - file_name="myfile", worker_id=0, log_folder="./some-log-folder-path" + file_name="myfile", + worker_id=0, + log_folder=os.path.join(".", "some-log-folder-path"), ) args = env._executable_args() log_file_index = args.index("-logFile") - assert args[log_file_index + 1] == "./some-log-folder-path/Player-0.log" + assert args[log_file_index + 1] == os.path.join( + ".", "some-log-folder-path", "Player-0.log" + ) env.close() diff --git a/ml-agents/mlagents/trainers/tests/test_trainer_util.py b/ml-agents/mlagents/trainers/tests/test_trainer_util.py index 3d90e46fb0..7bed615bd1 100644 --- a/ml-agents/mlagents/trainers/tests/test_trainer_util.py +++ b/ml-agents/mlagents/trainers/tests/test_trainer_util.py @@ -149,13 +149,20 @@ def test_setup_init_path(tmpdir, dir_exists): :return: """ - test_yaml = """ + init_path = os.path.join( + "{}", + "test_setup_init_path_results", + "test_run_id", + "MediumWallJump", + "checkpoint.pt", + ) + test_yaml = f""" behaviors: BigWallJump: init_path: BigWallJump-6540981.pt #full path trainer_type: ppo MediumWallJump: - init_path: {}/test_setup_init_path_results/test_run_id/MediumWallJump/checkpoint.pt + init_path: {init_path} trainer_type: ppo SmallWallJump: trainer_type: ppo diff --git a/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py b/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py index 27886f2743..355f138027 100644 --- a/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py +++ b/ml-agents/mlagents/trainers/tests/torch_entities/test_simple_rl.py @@ -93,7 +93,7 @@ def test_var_len_obs_and_goal_poca(num_vis, num_vector, num_var_len, conditionin POCA_TORCH_CONFIG, hyperparameters=new_hyperparams, network_settings=new_network, - max_steps=25000, + max_steps=5000, ) check_environment_trains(env, {BRAIN_NAME: config}) diff --git a/ml-agents/setup.py b/ml-agents/setup.py index ee69dff40e..eff409bf48 100644 --- a/ml-agents/setup.py +++ b/ml-agents/setup.py @@ -62,7 +62,7 @@ def run(self): "Pillow>=4.2.1", "protobuf>=3.6,<3.20", "pyyaml>=3.1.0", - "torch>=1.13.1", + "torch>=2.1.1", "tensorboard>=2.14", # adding six explicit dependency since tensorboard needs it but doesn't declare it as a dep "six>=1.16", diff --git a/test_constraints_version.txt b/test_constraints_version.txt index 30421ac6bb..f915bb23a5 100644 --- a/test_constraints_version.txt +++ b/test_constraints_version.txt @@ -1,3 +1,3 @@ # pip constraints to use the *highest* versions allowed in ml-agents/setup.py # For projects with upper bounds, we should periodically update this list to the latest -torch==1.13.1 +torch==2.1.1