From a7dd4d3c3f5a20b59ad035b8bdca1317387355f9 Mon Sep 17 00:00:00 2001 From: Alex Suvorov Date: Sat, 14 Jun 2025 01:20:50 +0200 Subject: [PATCH 1/2] Update to Inference Engine 2.2.1 --- DevProject/Packages/packages-lock.json | 24 +++++++++---------- .../Packages/packages-lock.json | 24 +++++++++---------- .../Examples/3DBall/TFModels/3DBall.onnx.meta | 5 +++- .../3DBall/TFModels/3DBallHard.onnx.meta | 5 +++- .../3DBall/TFModels/Visual3DBall.onnx.meta | 5 +++- .../Examples/Basic/TFModels/Basic.onnx.meta | 6 +++-- .../Crawler/TFModels/Crawler.onnx.meta | 6 +++-- .../TFModels/DungeonEscape.onnx.meta | 5 +++- .../TFModels/GridFoodCollector.onnx.meta | 6 +++-- .../TFModels/VisualFoodCollector.onnx.meta | 6 +++-- .../Examples/GridFoodCollector.onnx.meta | 6 +++-- .../GridWorld/TFModels/GridWorld.onnx.meta | 5 +++- .../TFModels/GridWorldColab.onnx.meta | 6 +++-- .../Hallway/TFModels/Hallway.onnx.meta | 6 +++-- .../Match3/TFModels/Match3VectorObs.onnx.meta | 6 +++-- .../Match3/TFModels/Match3VisualObs.onnx.meta | 6 +++-- .../PushBlock/TFModels/PushBlock.onnx.meta | 6 +++-- .../TFModels/PushBlockCollab.onnx.meta | 6 +++-- .../TFModels/PushBlock.onnx.meta | 6 +++-- .../Pyramids/TFModels/Pyramids.onnx.meta | 6 +++-- .../SharedAssets/Scripts/ModelCarousel.cs | 2 +- .../SharedAssets/Scripts/ModelOverrider.cs | 2 +- .../Examples/Soccer/TFModels/Goalie.onnx.meta | 6 +++-- .../Soccer/TFModels/SoccerTwos.onnx.meta | 5 +++- .../Soccer/TFModels/Striker.onnx.meta | 6 +++-- .../Examples/Sorter/TFModels/Sorter.onnx.meta | 6 +++-- .../Examples/Walker/TFModels/Walker.onnx.meta | 6 +++-- .../WallJump/Scripts/WallJumpAgent.cs | 2 +- .../WallJump/TFModels/BigWallJump.onnx.meta | 6 +++-- .../WallJump/TFModels/SmallWallJump.onnx.meta | 6 +++-- .../Examples/Worm/TFModels/Worm.onnx.meta | 6 +++-- Project/Packages/packages-lock.json | 24 +++++++++---------- .../Unity.ML-Agents.Extensions.Input.asmdef | 2 +- .../Runtime/Unity.ML-Agents.Extensions.asmdef | 2 +- .../Runtime/Input/InputActionActuatorTests.cs | 2 +- ...ents.Extensions.Input.Tests.Runtime.asmdef | 2 +- .../Editor/BehaviorParametersEditor.cs | 2 +- .../Editor/Unity.ML-Agents.Editor.asmdef | 2 +- com.unity.ml-agents/Runtime/Academy.cs | 2 +- com.unity.ml-agents/Runtime/Agent.cs | 2 +- .../Runtime/Analytics/InferenceAnalytics.cs | 2 +- .../Runtime/Inference/ApplierImpl.cs | 2 +- .../Inference/DynamicTensorShapeExtensions.cs | 2 +- .../Runtime/Inference/GeneratorImpl.cs | 2 +- .../Runtime/Inference/ModelRunner.cs | 2 +- .../Runtime/Inference/SentisModelInfo.cs | 2 +- .../Inference/SentisModelParamLoader.cs | 2 +- .../Runtime/Inference/TensorApplier.cs | 2 +- .../Runtime/Inference/TensorExtensions.cs | 2 +- .../Runtime/Inference/TensorGenerator.cs | 2 +- .../Runtime/Inference/TensorProxy.cs | 6 ++--- .../Runtime/Policies/BehaviorParameters.cs | 2 +- .../Runtime/Policies/SentisPolicy.cs | 2 +- com.unity.ml-agents/Runtime/SensorHelper.cs | 2 +- .../Runtime/Sensors/ObservationWriter.cs | 4 ++-- .../Runtime/Sensors/StackingSensor.cs | 2 +- .../Runtime/Unity.ML-Agents.asmdef | 2 +- .../Analytics/InferenceAnalyticsTests.cs | 2 +- .../Tests/Editor/BehaviorParameterTests.cs | 2 +- .../DiscreteActionOutputApplierTest.cs | 2 +- .../EditModeTestInternalBrainTensorApplier.cs | 2 +- ...ditModeTestInternalBrainTensorGenerator.cs | 2 +- .../Tests/Editor/Inference/ModelRunnerTest.cs | 2 +- .../Editor/Inference/ParameterLoaderTest.cs | 2 +- .../Tests/Editor/Inference/TensorUtilsTest.cs | 2 +- ...ty.ML-Agents.Editor.Tests.PublicAPI.asmdef | 2 +- .../continuous2vis8vec2action_v1_0.onnx.meta | 6 +++-- ...erContinuous2vis8vec2action_v2_0.onnx.meta | 6 +++-- .../deterDiscrete1obs3action_v2_0.onnx.meta | 6 +++-- ...c_2_3action_obsolete_recurr_v1_0.onnx.meta | 6 +++-- .../discrete1vis0vec_2_3action_v1_0.onnx.meta | 6 +++-- .../discrete_rank2_vector_v2_0.onnx.meta | 6 +++-- ...hybrid0vis53vec_3c_2daction_v1_0.onnx.meta | 6 +++-- .../hybrid0vis8vec_2c_2_3d_v2_0.onnx.meta | 6 +++-- .../Unity.ML-Agents.Editor.Tests.asmdef | 2 +- .../Runtime/Sensor/ObservationWriterTests.cs | 2 +- ...nity.ML-Agents.Runtime.Sensor.Tests.asmdef | 2 +- .../Unity.ML-Agents.Runtime.Tests.asmdef | 2 +- ...Unity.ML-Agents.Runtime.Utils.Tests.asmdef | 2 +- com.unity.ml-agents/package.json | 2 +- 80 files changed, 218 insertions(+), 144 deletions(-) diff --git a/DevProject/Packages/packages-lock.json b/DevProject/Packages/packages-lock.json index 3957511d50..682353c648 100644 --- a/DevProject/Packages/packages-lock.json +++ b/DevProject/Packages/packages-lock.json @@ -1,5 +1,16 @@ { "dependencies": { + "com.unity.ai.inference": { + "version": "2.2.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.8.17", + "com.unity.collections": "2.4.3", + "com.unity.modules.imageconversion": "1.0.0" + }, + "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + }, "com.unity.ai.navigation": { "version": "2.0.6", "depth": 0, @@ -68,7 +79,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.sentis": "2.1.0", + "com.unity.ai.inference": "2.2.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" @@ -125,17 +136,6 @@ }, "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, - "com.unity.sentis": { - "version": "2.1.2", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.burst": "1.8.17", - "com.unity.collections": "2.4.3", - "com.unity.modules.imageconversion": "1.0.0" - }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" - }, "com.unity.settings-manager": { "version": "2.0.1", "depth": 1, diff --git a/PerformanceProject/Packages/packages-lock.json b/PerformanceProject/Packages/packages-lock.json index 2cb8aef555..f3d6f8a358 100644 --- a/PerformanceProject/Packages/packages-lock.json +++ b/PerformanceProject/Packages/packages-lock.json @@ -1,5 +1,16 @@ { "dependencies": { + "com.unity.ai.inference": { + "version": "2.2.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.8.17", + "com.unity.collections": "2.4.3", + "com.unity.modules.imageconversion": "1.0.0" + }, + "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" + }, "com.unity.burst": { "version": "1.8.19", "depth": 2, @@ -95,7 +106,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.sentis": "2.1.0", + "com.unity.ai.inference": "2.2.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" @@ -130,17 +141,6 @@ "dependencies": {}, "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" }, - "com.unity.sentis": { - "version": "2.1.2", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.burst": "1.8.17", - "com.unity.collections": "2.4.3", - "com.unity.modules.imageconversion": "1.0.0" - }, - "url": "https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-candidates" - }, "com.unity.settings-manager": { "version": "2.0.1", "depth": 2, diff --git a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.onnx.meta b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.onnx.meta index bb39caabbd..c2139ca7f1 100644 --- a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBall.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.onnx.meta b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.onnx.meta index 80caa916a1..3846000f6a 100644 --- a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/3DBallHard.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/Visual3DBall.onnx.meta b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/Visual3DBall.onnx.meta index 0a7caf36d9..b357099e0f 100644 --- a/Project/Assets/ML-Agents/Examples/3DBall/TFModels/Visual3DBall.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/3DBall/TFModels/Visual3DBall.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.onnx.meta b/Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.onnx.meta index 369415a5e2..0fee39cff8 100644 --- a/Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Basic/TFModels/Basic.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Crawler/TFModels/Crawler.onnx.meta b/Project/Assets/ML-Agents/Examples/Crawler/TFModels/Crawler.onnx.meta index b8b96b6e55..f34121c807 100644 --- a/Project/Assets/ML-Agents/Examples/Crawler/TFModels/Crawler.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Crawler/TFModels/Crawler.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/DungeonEscape/TFModels/DungeonEscape.onnx.meta b/Project/Assets/ML-Agents/Examples/DungeonEscape/TFModels/DungeonEscape.onnx.meta index 09f3590ee6..f477382ba8 100644 --- a/Project/Assets/ML-Agents/Examples/DungeonEscape/TFModels/DungeonEscape.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/DungeonEscape/TFModels/DungeonEscape.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/GridFoodCollector.onnx.meta b/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/GridFoodCollector.onnx.meta index c22d2a400a..0f07f7d75f 100644 --- a/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/GridFoodCollector.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/GridFoodCollector.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/VisualFoodCollector.onnx.meta b/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/VisualFoodCollector.onnx.meta index 912fe9c3d9..8c8711ebb3 100644 --- a/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/VisualFoodCollector.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/FoodCollector/TFModels/VisualFoodCollector.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/GridFoodCollector.onnx.meta b/Project/Assets/ML-Agents/Examples/GridFoodCollector.onnx.meta index edafdc9fb4..2c7e330f1c 100644 --- a/Project/Assets/ML-Agents/Examples/GridFoodCollector.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/GridFoodCollector.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld.onnx.meta b/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld.onnx.meta index 392beed1be..e6406bfe7d 100644 --- a/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorld.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorldColab.onnx.meta b/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorldColab.onnx.meta index 0f8782f8c3..2b6ff74d53 100644 --- a/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorldColab.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/GridWorld/TFModels/GridWorldColab.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.onnx.meta b/Project/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.onnx.meta index 15893f2ada..691958a535 100644 --- a/Project/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Hallway/TFModels/Hallway.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VectorObs.onnx.meta b/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VectorObs.onnx.meta index 8e31b9ce9c..5e4d8d4ef8 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VectorObs.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VectorObs.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VisualObs.onnx.meta b/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VisualObs.onnx.meta index 9a836425aa..1e4f118af4 100644 --- a/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VisualObs.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Match3/TFModels/Match3VisualObs.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.onnx.meta b/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.onnx.meta index 4d72d546ce..3d4b94b16a 100644 --- a/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlock.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockCollab.onnx.meta b/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockCollab.onnx.meta index 892f14d372..abcaac8ba0 100644 --- a/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockCollab.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/PushBlock/TFModels/PushBlockCollab.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/PushBlockWithInput/TFModels/PushBlock.onnx.meta b/Project/Assets/ML-Agents/Examples/PushBlockWithInput/TFModels/PushBlock.onnx.meta index 709aca5e27..972b36fa3a 100644 --- a/Project/Assets/ML-Agents/Examples/PushBlockWithInput/TFModels/PushBlock.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/PushBlockWithInput/TFModels/PushBlock.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.onnx.meta b/Project/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.onnx.meta index fc3eb7ce99..3c35039ff1 100644 --- a/Project/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Pyramids/TFModels/Pyramids.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelCarousel.cs b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelCarousel.cs index f0e1209781..e169455883 100644 --- a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelCarousel.cs +++ b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelCarousel.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; using TMPro; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents; using Unity.MLAgents.Policies; using UnityEditor; diff --git a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs index 150e7c49b3..e6e4fb4caf 100644 --- a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs +++ b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using UnityEngine; -using Unity.Sentis; +using Unity.InferenceEngine; using System.IO; using Unity.MLAgents; using Unity.MLAgents.Policies; diff --git a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.onnx.meta b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.onnx.meta index 28c900bfde..03520c7f2d 100644 --- a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Goalie.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.onnx.meta b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.onnx.meta index 1b06509be8..90f42cef0f 100644 --- a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/SoccerTwos.onnx.meta @@ -7,4 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.onnx.meta b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.onnx.meta index e6d0780a6d..a65d747384 100644 --- a/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Soccer/TFModels/Striker.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Sorter/TFModels/Sorter.onnx.meta b/Project/Assets/ML-Agents/Examples/Sorter/TFModels/Sorter.onnx.meta index aafb4281ce..c5ffa1d953 100644 --- a/Project/Assets/ML-Agents/Examples/Sorter/TFModels/Sorter.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Sorter/TFModels/Sorter.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.onnx.meta b/Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.onnx.meta index 02fa2378db..1f724417fa 100644 --- a/Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Walker/TFModels/Walker.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs b/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs index 498b3f233f..290f5482c8 100644 --- a/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs +++ b/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs @@ -3,7 +3,7 @@ using System.Collections; using UnityEngine; using Unity.MLAgents; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Sensors; using Unity.MLAgentsExamples; diff --git a/Project/Assets/ML-Agents/Examples/WallJump/TFModels/BigWallJump.onnx.meta b/Project/Assets/ML-Agents/Examples/WallJump/TFModels/BigWallJump.onnx.meta index b4b1aad16f..2a8ebea559 100644 --- a/Project/Assets/ML-Agents/Examples/WallJump/TFModels/BigWallJump.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/WallJump/TFModels/BigWallJump.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/WallJump/TFModels/SmallWallJump.onnx.meta b/Project/Assets/ML-Agents/Examples/WallJump/TFModels/SmallWallJump.onnx.meta index 7468c1a57d..7aaa47db6c 100644 --- a/Project/Assets/ML-Agents/Examples/WallJump/TFModels/SmallWallJump.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/WallJump/TFModels/SmallWallJump.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Assets/ML-Agents/Examples/Worm/TFModels/Worm.onnx.meta b/Project/Assets/ML-Agents/Examples/Worm/TFModels/Worm.onnx.meta index 2a17cdb486..b013b7f694 100644 --- a/Project/Assets/ML-Agents/Examples/Worm/TFModels/Worm.onnx.meta +++ b/Project/Assets/ML-Agents/Examples/Worm/TFModels/Worm.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/Project/Packages/packages-lock.json b/Project/Packages/packages-lock.json index 52ee579a29..05c7777a63 100644 --- a/Project/Packages/packages-lock.json +++ b/Project/Packages/packages-lock.json @@ -7,6 +7,17 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.ai.inference": { + "version": "2.2.1", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.burst": "1.8.17", + "com.unity.collections": "2.4.3", + "com.unity.modules.imageconversion": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.ai.navigation": { "version": "2.0.6", "depth": 0, @@ -94,7 +105,7 @@ "depth": 0, "source": "local", "dependencies": { - "com.unity.sentis": "2.1.0", + "com.unity.ai.inference": "2.2.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" @@ -142,17 +153,6 @@ }, "url": "https://packages.unity.com" }, - "com.unity.sentis": { - "version": "2.1.2", - "depth": 1, - "source": "registry", - "dependencies": { - "com.unity.burst": "1.8.17", - "com.unity.collections": "2.4.3", - "com.unity.modules.imageconversion": "1.0.0" - }, - "url": "https://packages.unity.com" - }, "com.unity.sysroot": { "version": "2.0.10", "depth": 1, diff --git a/com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef b/com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef index 250fd8f6e2..51ee27288d 100644 --- a/com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef +++ b/com.unity.ml-agents.extensions/Runtime/Input/Unity.ML-Agents.Extensions.Input.asmdef @@ -2,7 +2,7 @@ "name": "Unity.ML-Agents.Extensions.Input", "references": [ "Unity.ML-Agents", - "Unity.Sentis", + "Unity.InferenceEngine", "Unity.InputSystem" ], "includePlatforms": [], diff --git a/com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef b/com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef index badd1e005b..4bd4bf5bab 100644 --- a/com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef +++ b/com.unity.ml-agents.extensions/Runtime/Unity.ML-Agents.Extensions.asmdef @@ -1,7 +1,7 @@ { "name": "Unity.ML-Agents.Extensions", "references": [ - "Unity.Sentis", + "Unity.InferenceEngine", "Unity.ML-Agents", "Unity.ML-Agents.Extensions.Input" ] diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs b/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs index d52cdfa770..e73400ce62 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/InputActionActuatorTests.cs @@ -3,7 +3,7 @@ using Unity.MLAgents.Actuators; using Unity.MLAgents.Extensions.Input; using Unity.MLAgents.Policies; -using Unity.Sentis; +using Unity.InferenceEngine; using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.InputSystem.LowLevel; diff --git a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef index 2b0c02f125..180d31d42c 100644 --- a/com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef +++ b/com.unity.ml-agents.extensions/Tests/Runtime/Input/Unity.ML-Agents.Extensions.Input.Tests.Runtime.asmdef @@ -7,7 +7,7 @@ "UnityEngine.TestRunner", "UnityEditor.TestRunner", "Unity.InputSystem", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs b/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs index 68c6d5f6c8..5518ac3db8 100644 --- a/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs +++ b/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using UnityEditor; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Policies; using Unity.MLAgents.Sensors; diff --git a/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef b/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef index 3013a9e62c..d849e006f9 100755 --- a/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef +++ b/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef @@ -4,7 +4,7 @@ "references": [ "Unity.ML-Agents", "Unity.ML-Agents.CommunicatorObjects", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [ "Editor" diff --git a/com.unity.ml-agents/Runtime/Academy.cs b/com.unity.ml-agents/Runtime/Academy.cs index 7916a001b9..bebb7174e4 100644 --- a/com.unity.ml-agents/Runtime/Academy.cs +++ b/com.unity.ml-agents/Runtime/Academy.cs @@ -8,7 +8,7 @@ using Unity.MLAgents.Inference; using Unity.MLAgents.Policies; using Unity.MLAgents.SideChannels; -using Unity.Sentis; +using Unity.InferenceEngine; /** * Welcome to Unity Machine Learning Agents (ML-Agents). diff --git a/com.unity.ml-agents/Runtime/Agent.cs b/com.unity.ml-agents/Runtime/Agent.cs index 66f4c3821e..ea13bcfa6a 100644 --- a/com.unity.ml-agents/Runtime/Agent.cs +++ b/com.unity.ml-agents/Runtime/Agent.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using UnityEngine; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Sensors; using Unity.MLAgents.Sensors.Reflection; diff --git a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs index 7cf2b85ac1..10baf7ff63 100644 --- a/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs +++ b/com.unity.ml-agents/Runtime/Analytics/InferenceAnalytics.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System.Diagnostics; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Inference; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs b/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs index f39f271635..f7f137cd50 100644 --- a/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs +++ b/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs @@ -2,7 +2,7 @@ using System.Linq; using Unity.MLAgents.Inference.Utils; using Unity.MLAgents.Actuators; -using Unity.Sentis; +using Unity.InferenceEngine; using UnityEngine; namespace Unity.MLAgents.Inference diff --git a/com.unity.ml-agents/Runtime/Inference/DynamicTensorShapeExtensions.cs b/com.unity.ml-agents/Runtime/Inference/DynamicTensorShapeExtensions.cs index c3f6fec9ef..5a07412701 100644 --- a/com.unity.ml-agents/Runtime/Inference/DynamicTensorShapeExtensions.cs +++ b/com.unity.ml-agents/Runtime/Inference/DynamicTensorShapeExtensions.cs @@ -1,4 +1,4 @@ -using Unity.Sentis; +using Unity.InferenceEngine; using UnityEngine.Assertions; namespace Unity.MLAgents.Inference diff --git a/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs b/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs index 2cc50f0f9c..5e231f6712 100644 --- a/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs +++ b/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using System; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference.Utils; using Unity.MLAgents.Sensors; using static Unity.MLAgents.Inference.TensorProxy; diff --git a/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs b/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs index 03451600b5..751d730e4e 100644 --- a/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs +++ b/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using UnityEngine.Profiling; using Unity.MLAgents.Actuators; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs b/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs index a2ef038299..9eeb763fc8 100644 --- a/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs +++ b/com.unity.ml-agents/Runtime/Inference/SentisModelInfo.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Unity.Sentis; +using Unity.InferenceEngine; using FailedCheck = Unity.MLAgents.Inference.SentisModelParamLoader.FailedCheck; namespace Unity.MLAgents.Inference diff --git a/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs b/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs index 17fe7b6f22..b33c6f66fe 100644 --- a/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs +++ b/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Sensors; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs b/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs index bfdd70b1c1..060bfc6d3a 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; diff --git a/com.unity.ml-agents/Runtime/Inference/TensorExtensions.cs b/com.unity.ml-agents/Runtime/Inference/TensorExtensions.cs index e86b70fe6c..9e358cf157 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorExtensions.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorExtensions.cs @@ -1,4 +1,4 @@ -using Unity.Sentis; +using Unity.InferenceEngine; namespace Unity.MLAgents.Inference { diff --git a/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs b/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs index aa7b5d0159..0db6b8587e 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Sensors; namespace Unity.MLAgents.Inference diff --git a/com.unity.ml-agents/Runtime/Inference/TensorProxy.cs b/com.unity.ml-agents/Runtime/Inference/TensorProxy.cs index 1332499c48..bce71aac7c 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorProxy.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorProxy.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference.Utils; using Unity.MLAgents.Policies; @@ -33,8 +33,8 @@ public enum TensorType static readonly Dictionary k_DTypeMap = new Dictionary() { - { TensorType.FloatingPoint, Sentis.DataType.Float }, - { TensorType.Integer, Sentis.DataType.Int } + { TensorType.FloatingPoint, InferenceEngine.DataType.Float }, + { TensorType.Integer, InferenceEngine.DataType.Int } }; public string name; diff --git a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs index 06dc8d6e16..5fd8d9aad7 100644 --- a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs +++ b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs @@ -1,4 +1,4 @@ -using Unity.Sentis; +using Unity.InferenceEngine; using System; using UnityEngine; using UnityEngine.Serialization; diff --git a/com.unity.ml-agents/Runtime/Policies/SentisPolicy.cs b/com.unity.ml-agents/Runtime/Policies/SentisPolicy.cs index 6effbc9763..796f907b9b 100644 --- a/com.unity.ml-agents/Runtime/Policies/SentisPolicy.cs +++ b/com.unity.ml-agents/Runtime/Policies/SentisPolicy.cs @@ -1,4 +1,4 @@ -using Unity.Sentis; +using Unity.InferenceEngine; using System.Collections.Generic; using System.Diagnostics; using Unity.MLAgents.Actuators; diff --git a/com.unity.ml-agents/Runtime/SensorHelper.cs b/com.unity.ml-agents/Runtime/SensorHelper.cs index 3c3a713051..e4dc9f227d 100644 --- a/com.unity.ml-agents/Runtime/SensorHelper.cs +++ b/com.unity.ml-agents/Runtime/SensorHelper.cs @@ -1,4 +1,4 @@ -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference; namespace Unity.MLAgents.Sensors diff --git a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs index 503b4d49c5..0769bf625d 100644 --- a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs +++ b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference; using UnityEngine; -using DeviceType = Unity.Sentis.DeviceType; +using DeviceType = Unity.InferenceEngine.DeviceType; namespace Unity.MLAgents.Sensors { diff --git a/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs b/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs index 99d47d5e4c..fbf09ae77f 100644 --- a/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs +++ b/com.unity.ml-agents/Runtime/Sensors/StackingSensor.cs @@ -3,7 +3,7 @@ using System.Collections.ObjectModel; using System.Linq; using UnityEngine; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference; namespace Unity.MLAgents.Sensors diff --git a/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef b/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef index a0ac715dbf..1b0f8ca4d7 100755 --- a/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef +++ b/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef @@ -4,7 +4,7 @@ "references": [ "Unity.ML-Agents.CommunicatorObjects", "Unity.Mathematics", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs b/com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs index 14c9dd14fe..7b4cfb285f 100644 --- a/com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Analytics/InferenceAnalyticsTests.cs @@ -3,7 +3,7 @@ using NUnit.Framework; using Unity.MLAgents.Sensors; using UnityEngine; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Policies; using Unity.MLAgents.Analytics; diff --git a/com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs b/com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs index f4eb154298..4733189e87 100644 --- a/com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs +++ b/com.unity.ml-agents/Tests/Editor/BehaviorParameterTests.cs @@ -1,5 +1,5 @@ using NUnit.Framework; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using UnityEngine; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs b/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs index 6413be4479..9cfbd8b3be 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/DiscreteActionOutputApplierTest.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using NUnit.Framework; using Unity.MLAgents.Actuators; using Unity.MLAgents.Inference; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorApplier.cs b/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorApplier.cs index d9cb034e60..3c6a8de167 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorApplier.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorApplier.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; using NUnit.Framework; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Inference; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorGenerator.cs b/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorGenerator.cs index d09e0884af..90cbd70299 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorGenerator.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/EditModeTestInternalBrainTensorGenerator.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Unity.Sentis; +using Unity.InferenceEngine; using NUnit.Framework; using UnityEngine; using Unity.MLAgents.Actuators; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/ModelRunnerTest.cs b/com.unity.ml-agents/Tests/Editor/Inference/ModelRunnerTest.cs index e9ab36aadf..4cddb33ba4 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/ModelRunnerTest.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/ModelRunnerTest.cs @@ -3,7 +3,7 @@ using NUnit.Framework; using UnityEngine; using UnityEditor; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Inference; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/ParameterLoaderTest.cs b/com.unity.ml-agents/Tests/Editor/Inference/ParameterLoaderTest.cs index 72a9104b2d..7d6e8f60a0 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/ParameterLoaderTest.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/ParameterLoaderTest.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using UnityEngine; using UnityEditor; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Actuators; using Unity.MLAgents.Inference; using Unity.MLAgents.Sensors; diff --git a/com.unity.ml-agents/Tests/Editor/Inference/TensorUtilsTest.cs b/com.unity.ml-agents/Tests/Editor/Inference/TensorUtilsTest.cs index d213819cb7..412c999c52 100644 --- a/com.unity.ml-agents/Tests/Editor/Inference/TensorUtilsTest.cs +++ b/com.unity.ml-agents/Tests/Editor/Inference/TensorUtilsTest.cs @@ -1,6 +1,6 @@ using System; using NUnit.Framework; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Inference; using Unity.MLAgents.Inference.Utils; diff --git a/com.unity.ml-agents/Tests/Editor/PublicAPI/Unity.ML-Agents.Editor.Tests.PublicAPI.asmdef b/com.unity.ml-agents/Tests/Editor/PublicAPI/Unity.ML-Agents.Editor.Tests.PublicAPI.asmdef index dd6e506fb8..4a42134bfe 100755 --- a/com.unity.ml-agents/Tests/Editor/PublicAPI/Unity.ML-Agents.Editor.Tests.PublicAPI.asmdef +++ b/com.unity.ml-agents/Tests/Editor/PublicAPI/Unity.ML-Agents.Editor.Tests.PublicAPI.asmdef @@ -7,7 +7,7 @@ "Unity.ML-Agents.CommunicatorObjects", "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [ "Editor" diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/continuous2vis8vec2action_v1_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/continuous2vis8vec2action_v1_0.onnx.meta index 1371d9ad07..3f4646c859 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/continuous2vis8vec2action_v1_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/continuous2vis8vec2action_v1_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/deterContinuous2vis8vec2action_v2_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/deterContinuous2vis8vec2action_v2_0.onnx.meta index f5905d30cd..2307b73dd6 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/deterContinuous2vis8vec2action_v2_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/deterContinuous2vis8vec2action_v2_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/deterDiscrete1obs3action_v2_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/deterDiscrete1obs3action_v2_0.onnx.meta index 620e69b3a0..d31c286324 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/deterDiscrete1obs3action_v2_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/deterDiscrete1obs3action_v2_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_obsolete_recurr_v1_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_obsolete_recurr_v1_0.onnx.meta index 9a7fc3d4f4..018f6f42fb 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_obsolete_recurr_v1_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_obsolete_recurr_v1_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_v1_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_v1_0.onnx.meta index 24f8945676..c9b6bc5d0f 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_v1_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/discrete1vis0vec_2_3action_v1_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/discrete_rank2_vector_v2_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/discrete_rank2_vector_v2_0.onnx.meta index b7c31307dc..3e1c733503 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/discrete_rank2_vector_v2_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/discrete_rank2_vector_v2_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis53vec_3c_2daction_v1_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis53vec_3c_2daction_v1_0.onnx.meta index d87142266a..8ef5a65ab5 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis53vec_3c_2daction_v1_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis53vec_3c_2daction_v1_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis8vec_2c_2_3d_v2_0.onnx.meta b/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis8vec_2c_2_3d_v2_0.onnx.meta index 8cd681dbb2..3164b4cd08 100644 --- a/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis8vec_2c_2_3d_v2_0.onnx.meta +++ b/com.unity.ml-agents/Tests/Editor/TestModels/hybrid0vis8vec_2c_2_3d_v2_0.onnx.meta @@ -7,5 +7,7 @@ ScriptedImporter: userData: assetBundleName: assetBundleVariant: - script: {fileID: 11500000, guid: 683b6cb6d0a474744822c888b46772c9, type: 3} - optimizeModel: 1 + script: {fileID: 11500000, guid: f22407ba6b4157b4a93d0a670bd3dd57, type: 3} + dynamicDimConfigs: + - name: batch + size: -1 diff --git a/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef b/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef index de0233eb44..4132f43084 100755 --- a/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef +++ b/com.unity.ml-agents/Tests/Editor/Unity.ML-Agents.Editor.Tests.asmdef @@ -10,7 +10,7 @@ "Unity.ML-Agents.Runtime.Sensor.Tests", "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [ "Editor" diff --git a/com.unity.ml-agents/Tests/Runtime/Sensor/ObservationWriterTests.cs b/com.unity.ml-agents/Tests/Runtime/Sensor/ObservationWriterTests.cs index e22194b75f..66a3d4530e 100644 --- a/com.unity.ml-agents/Tests/Runtime/Sensor/ObservationWriterTests.cs +++ b/com.unity.ml-agents/Tests/Runtime/Sensor/ObservationWriterTests.cs @@ -1,5 +1,5 @@ using NUnit.Framework; -using Unity.Sentis; +using Unity.InferenceEngine; using Unity.MLAgents.Sensors; using Unity.MLAgents.Inference; diff --git a/com.unity.ml-agents/Tests/Runtime/Sensor/Unity.ML-Agents.Runtime.Sensor.Tests.asmdef b/com.unity.ml-agents/Tests/Runtime/Sensor/Unity.ML-Agents.Runtime.Sensor.Tests.asmdef index f97212ddbf..ed2c2083f7 100644 --- a/com.unity.ml-agents/Tests/Runtime/Sensor/Unity.ML-Agents.Runtime.Sensor.Tests.asmdef +++ b/com.unity.ml-agents/Tests/Runtime/Sensor/Unity.ML-Agents.Runtime.Sensor.Tests.asmdef @@ -7,7 +7,7 @@ "Unity.ML-Agents.Runtime.Utils.Tests", "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef b/com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef index 564a9daaf6..ca7211d376 100644 --- a/com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef +++ b/com.unity.ml-agents/Tests/Runtime/Unity.ML-Agents.Runtime.Tests.asmdef @@ -7,7 +7,7 @@ "Unity.ML-Agents.Editor", "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/com.unity.ml-agents/Tests/Runtime/Utils/Unity.ML-Agents.Runtime.Utils.Tests.asmdef b/com.unity.ml-agents/Tests/Runtime/Utils/Unity.ML-Agents.Runtime.Utils.Tests.asmdef index 37cc17387a..36181f2ad9 100644 --- a/com.unity.ml-agents/Tests/Runtime/Utils/Unity.ML-Agents.Runtime.Utils.Tests.asmdef +++ b/com.unity.ml-agents/Tests/Runtime/Utils/Unity.ML-Agents.Runtime.Utils.Tests.asmdef @@ -6,7 +6,7 @@ "Unity.ML-Agents.CommunicatorObjects", "UnityEngine.TestRunner", "UnityEditor.TestRunner", - "Unity.Sentis" + "Unity.InferenceEngine" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/com.unity.ml-agents/package.json b/com.unity.ml-agents/package.json index 71a806f1d7..ad4b9d72ca 100755 --- a/com.unity.ml-agents/package.json +++ b/com.unity.ml-agents/package.json @@ -5,7 +5,7 @@ "unity": "6000.0", "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": "2.1.0", + "com.unity.ai.inference": "2.2.1", "com.unity.modules.imageconversion": "1.0.0", "com.unity.modules.jsonserialize": "1.0.0", "com.unity.modules.physics": "1.0.0" From 7bc123117bec62bc8c38e08ffc801cca53afe838 Mon Sep 17 00:00:00 2001 From: Alex Suvorov Date: Sat, 14 Jun 2025 13:02:01 +0200 Subject: [PATCH 2/2] Update documentation --- .../Scripts/Tests/Editor/Editor.asmdef | 2 +- colab/Colab_UnityEnvironment_2_Train.ipynb | 4 +-- com.unity.ml-agents/CHANGELOG.md | 6 +++- .../Documentation~/com.unity.ml-agents.md | 6 ++-- docs/Getting-Started.md | 2 +- docs/{Sentis.md => Inference-Engine.md} | 29 ++++++++++--------- docs/ML-Agents-Overview.md | 4 +-- docs/ML-Agents-Toolkit-Documentation.md | 2 +- docs/Migrating.md | 2 +- docs/Readme.md | 4 +-- docs/Training-ML-Agents.md | 2 +- 11 files changed, 35 insertions(+), 28 deletions(-) rename docs/{Sentis.md => Inference-Engine.md} (65%) diff --git a/DevProject/Assets/ML-Agents/Scripts/Tests/Editor/Editor.asmdef b/DevProject/Assets/ML-Agents/Scripts/Tests/Editor/Editor.asmdef index efc4358516..680d1a8eca 100755 --- a/DevProject/Assets/ML-Agents/Scripts/Tests/Editor/Editor.asmdef +++ b/DevProject/Assets/ML-Agents/Scripts/Tests/Editor/Editor.asmdef @@ -3,7 +3,7 @@ "references": [ "Unity.ML-Agents.Editor", "Unity.ML-Agents", - "Unity.Sentis", + "Unity.InferenceEngine", "Unity.ML-Agents.CommunicatorObjects", "Unity.PerformanceTesting" ], diff --git a/colab/Colab_UnityEnvironment_2_Train.ipynb b/colab/Colab_UnityEnvironment_2_Train.ipynb index 80b82b428e..ca55f8a58e 100644 --- a/colab/Colab_UnityEnvironment_2_Train.ipynb +++ b/colab/Colab_UnityEnvironment_2_Train.ipynb @@ -694,7 +694,7 @@ { "cell_type": "markdown", "source": [ - "The following cell provides an example of some of the extra tensors a model needs to work for ML-Agents inference with Sentis. The GridWorldColab scene is configured to work with this ONNX file.\n", + "The following cell provides an example of some of the extra tensors a model needs to work for ML-Agents inference with Inference Engine. The GridWorldColab scene is configured to work with this ONNX file.\n", "Only policy models need to be exported for inference and they need the following additional tensors:\n", "\n", "* All models need version_number\n", @@ -718,7 +718,7 @@ " ):\n", " \"\"\"\n", " Wraps the VisualQNetwork adding extra constants and dummy mask inputs\n", - " required by runtime inference with Sentis.\n", + " required by runtime inference with Inference Engine.\n", "\n", " For environment continuous actions outputs would need to add them\n", " similarly to how discrete action outputs work, both in the wrapper\n", diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 1df8673289..876608252c 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -9,8 +9,13 @@ and this project adheres to ## [Unreleased] ### Major Changes #### com.unity.ml-agents / com.unity.ml-agents.extensions (C#) +- Upgraded to Inference Engine 2.2.1 (#6212) - The minimum supported Unity version was updated to 6000.0. (#6207) +### Minor Changes +#### ml-agents / ml-agents-envs +- Bumped grpcio version to >=1.11.0,<=1.53.2 (#6208) + ## [3.0.0] - 2024-09-02 ### Major Changes #### com.unity.ml-agents / com.unity.ml-agents.extensions (C#) @@ -28,7 +33,6 @@ and this project adheres to - Added no-graphics-monitor. (#6014) #### ml-agents / ml-agents-envs -- Upgraded grpcio version. (#6208) - Update Installation.md (#6004) - Updated Using-Virtual-Environment.md (#6033) 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 05ab86d137..60268878b5 100644 --- a/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md +++ b/com.unity.ml-agents/Documentation~/com.unity.ml-agents.md @@ -9,7 +9,7 @@ The package allows you to convert any Unity scene into a learning environment an * Define Agents: entities, or characters, whose behavior will be learned. Agents are entities that generate observations (through sensors), take actions, and receive rewards from the environment. * Define Behaviors: entities that specify how an agent should act. Multiple agents can share the same Behavior and a scene may have multiple Behaviors. * Record demonstrations: To show the behaviors of an agent within the Editor. You can use demonstrations to help train a behavior for that agent. -* Embed a trained behavior (aka: run your ML model) in the scene via the [Unity Sentis] inference engine. Embedded behaviors allow you to switch an Agent between learning and inference. +* Embed a trained behavior (aka: run your ML model) in the scene via the [Unity Inference Engine]. Embedded behaviors allow you to switch an Agent between learning and inference. ## Special Notes Note that the ML-Agents package does not contain the machine learning algorithms for training behaviors. The ML-Agents package only supports instrumenting a Unity scene, setting it up for training, and then embedding the trained model back into your Unity scene. The machine learning algorithms that orchestrate training are part of the companion [python package]. @@ -53,7 +53,7 @@ mode if training is not supported or is not currently running. ### Inference -Inference is executed via [Unity Sentis](https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html) on the end-user device. Therefore, it is subject to the performance limitations of the end-user CPU or GPU. Also, only models created with our trainers are supported for running ML-Agents with a neural network behavior. +Inference is executed via [Unity Inference Engine](https://docs.unity3d.com/Packages/com.unity.ai.inference@latest) on the end-user device. Therefore, it is subject to the performance limitations of the end-user CPU or GPU. Also, only models created with our trainers are supported for running ML-Agents with a neural network behavior. ### Headless Mode @@ -74,7 +74,7 @@ You can control the frequency of Academy stepping by calling `Academy.Instance.D [github docs]: https://unity-technologies.github.io/ml-agents/ [installation instructions]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/docs/Installation.md -[Unity Sentis]: https://docs.unity3d.com/Packages/com.unity.sentis@2.1/manual/index.html +[Unity Inference Engine]: https://docs.unity3d.com/Packages/com.unity.ai.inference@2.2/manual/index.html [python package]: https://github.com/Unity-Technologies/ml-agents [ML-Agents GitHub repo]: https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents.extensions [GitHub repository]: https://github.com/Unity-Technologies/ml-agents diff --git a/docs/Getting-Started.md b/docs/Getting-Started.md index c470bac51a..33ce2e862b 100644 --- a/docs/Getting-Started.md +++ b/docs/Getting-Started.md @@ -92,7 +92,7 @@ itself to keep the ball balanced on its head. ## Running a pre-trained model We include pre-trained models for our agents (`.onnx` files) and we use the -[Sentis](Sentis.md) to run these models inside +[Inference Engine](Inference-Engine.md) to run these models inside Unity. In this section, we will use the pre-trained model for the 3D Ball example. diff --git a/docs/Sentis.md b/docs/Inference-Engine.md similarity index 65% rename from docs/Sentis.md rename to docs/Inference-Engine.md index 55566f3a53..0f7c3e3402 100644 --- a/docs/Sentis.md +++ b/docs/Inference-Engine.md @@ -1,32 +1,35 @@ -# Sentis +# Inference Engine The ML-Agents Toolkit allows you to use pre-trained neural network models inside your Unity games. This support is possible thanks to the -[Sentis](https://docs.unity3d.com/Packages/com.unity.sentis@latest/index.html) -(codenamed Sentis). Sentis uses +[Inference Engine](https://docs.unity3d.com/Packages/com.unity.ai.inference@latest). +Inference Engine uses [compute shaders](https://docs.unity3d.com/Manual/class-ComputeShader.html) to run the neural network within Unity. ## Supported devices -See the Sentis documentation for a list of the -[supported platforms](https://docs.unity3d.com/Manual/PlatformSpecific.html). +Inference Engine supports [all Unity runtime platforms](https://docs.unity3d.com/Manual/PlatformSpecific.html). -Scripting Backends : Sentis is generally faster with +Scripting Backends : Inference Engine is generally faster with **IL2CPP** than with **Mono** for Standalone builds. In the Editor, It is not -possible to use Sentis with GPU device selected when Editor +possible to use Inference Engine with GPU device selected when Editor Graphics Emulation is set to **OpenGL(ES) 3.0 or 2.0 emulation**. Also there might be non-fatal build time errors when target platform includes Graphics API that does not support **Unity Compute Shaders**. -## Using Sentis +In cases when it is not possible to use compute shaders on the target platform, +inference can be performed using **CPU** or **GPUPixel** Inference Engine backends. + +## Using Inference Engine When using a model, drag the model file into the **Model** field in the -Inspector of the Agent. Select the **Inference Device** : CPU or GPU you want to -use for Inference. +Inspector of the Agent. Select the **Inference Device**: **Compute Shader**, **Burst** or +**Pixel Shader** you want to use for inference. -**Note:** For most of the models generated with the ML-Agents Toolkit, CPU will -be faster than GPU. You should use the GPU only if you use the ResNet visual +**Note:** For most of the models generated with the ML-Agents Toolkit, CPU inference (**Burst**) will +be faster than GPU inference (**Compute Shader** or **Pixel Shader**). +You should use GPU inference only if you use the ResNet visual encoder or have a large number of agents with visual observations. # Unsupported use cases @@ -40,7 +43,7 @@ and [SentisModelParamLoader.cs](https://github.com/Unity-Technologies/ml-agents/blob/release_22_docs/com.unity.ml-agents/Runtime/Inference/SentisModelParamLoader.cs). If you wish to run inference on an externally trained model, you should use -Sentis directly, instead of trying to run it through ML-Agents. +Inference Engine directly, instead of trying to run it through ML-Agents. ## Model inference outside of Unity We do not provide support for inference anywhere outside of Unity. The `.onnx` files produced by training use the open format ONNX; if you wish to convert a `.onnx` file to another diff --git a/docs/ML-Agents-Overview.md b/docs/ML-Agents-Overview.md index 0bdee003f2..2b9f3642b6 100644 --- a/docs/ML-Agents-Overview.md +++ b/docs/ML-Agents-Overview.md @@ -277,9 +277,9 @@ mode with the **3D Balance Ball** sample environment. #### Cross-Platform Inference It is important to note that the ML-Agents Toolkit leverages the -[Sentis](Sentis.md) to run the models within a +[Inference Engine](Inference-Engine.md) to run the models within a Unity scene such that an agent can take the _optimal_ action at each step. Given -that Sentis support most platforms that Unity does, this +that Inference Engine supports all Unity runtime platforms, this means that any model you train with the ML-Agents Toolkit can be embedded into your Unity application that runs on any platform. See our [dedicated blog post](https://blogs.unity3d.com/2019/03/01/unity-ml-agents-toolkit-v0-7-a-leap-towards-cross-platform-inference/) diff --git a/docs/ML-Agents-Toolkit-Documentation.md b/docs/ML-Agents-Toolkit-Documentation.md index 5cd6548c74..0a1226ca91 100644 --- a/docs/ML-Agents-Toolkit-Documentation.md +++ b/docs/ML-Agents-Toolkit-Documentation.md @@ -28,7 +28,7 @@ - [Training Configuration File](Training-Configuration-File.md) - [Using TensorBoard to Observe Training](Using-Tensorboard.md) - [Profiling Trainers](Profiling-Python.md) -- [Sentis](Sentis.md) +- [Inference Engine](Inference-Engine.md) ## Extending ML-Agents diff --git a/docs/Migrating.md b/docs/Migrating.md index 2c75ffe3e2..aba3d8565f 100644 --- a/docs/Migrating.md +++ b/docs/Migrating.md @@ -710,7 +710,7 @@ vector observations to be used simultaneously. ### Important Changes - We no longer support TFS and are now using the - [Sentis](Sentis.md) + [Sentis](Inference-Engine.md) #### Steps to Migrate diff --git a/docs/Readme.md b/docs/Readme.md index 0c5c6fa53b..aa6b4d8ade 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -34,7 +34,7 @@ developer communities. - Train robust agents using environment randomization - Flexible agent control with On Demand Decision Making - Train using multiple concurrent Unity environment instances -- Utilizes the [Sentis](Sentis.md) to +- Utilizes the [Inference Engine](Inference-Engine.md) to provide native cross-platform support - Unity environment [control from Python](Python-LLAPI.md) - Wrap Unity learning environments as a [gym](Python-Gym-API.md) environment @@ -166,7 +166,7 @@ We have also published a series of blog posts that are relevant for ML-Agents: ### More from Unity -- [Unity Sentis](https://unity.com/products/sentis) +- [Unity Inference Engine](https://unity.com/products/sentis) - [Introducing Unity Muse and Sentis](https://blog.unity.com/engine-platform/introducing-unity-muse-and-unity-sentis-ai) ## Community and Feedback diff --git a/docs/Training-ML-Agents.md b/docs/Training-ML-Agents.md index 9fd3f52006..dbd85e30d8 100644 --- a/docs/Training-ML-Agents.md +++ b/docs/Training-ML-Agents.md @@ -122,7 +122,7 @@ artifacts), then use the `--force` flag. You can also use this mode to run inference of an already-trained model in Python by using both the `--resume` and `--inference` flags. Note that if you want to run inference in Unity, you should use the -[Sentis](Getting-Started.md#running-a-pre-trained-model). +[Inference Engine](Getting-Started.md#running-a-pre-trained-model). Additionally, if the network architecture changes, you may still load an existing model, but ML-Agents will only load the parts of the model it can load and ignore all others. For instance,