diff --git a/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs b/Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs index 81d46b8df4..aaa1476448 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 Barracuda; +using Unity.Barracuda; using System.IO; using Unity.MLAgents; using Unity.MLAgents.Policies; diff --git a/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs b/Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs index 1111d00dc8..5d40ec0927 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 Barracuda; +using Unity.Barracuda; using Unity.MLAgents.Sensors; public class WallJumpAgent : Agent diff --git a/com.unity.ml-agents/CHANGELOG.md b/com.unity.ml-agents/CHANGELOG.md index 9a6e9e6029..04b7de26fb 100755 --- a/com.unity.ml-agents/CHANGELOG.md +++ b/com.unity.ml-agents/CHANGELOG.md @@ -43,6 +43,7 @@ and this project adheres to C# style conventions. All public fields and properties now use "PascalCase" instead of "camelCase"; for example, `Agent.maxStep` was renamed to `Agent.MaxStep`. For a full list of changes, see the pull request. (#3828) +- Updated to Barracuda 0.7.0-preivew which has breaking namespace and assembly name changes. #### ml-agents / ml-agents-envs / gym-unity (Python) - The `--load` and `--train` command-line flags have been deprecated. Training now happens by default, and use `--resume` to resume training instead. (#3705) diff --git a/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs b/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs index b10d490486..3cf6810712 100644 --- a/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs +++ b/com.unity.ml-agents/Editor/BehaviorParametersEditor.cs @@ -1,7 +1,7 @@ using Unity.MLAgents.Sensors; using UnityEditor; -using Barracuda; using Unity.MLAgents.Policies; +using Unity.Barracuda; using UnityEngine; namespace Unity.MLAgents.Editor 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 e83013881e..53a0ff77fd 100755 --- a/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef +++ b/com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef @@ -2,7 +2,7 @@ "name": "Unity.ML-Agents.Editor", "references": [ "Unity.ML-Agents", - "Barracuda", + "Unity.Barracuda", "Unity.ML-Agents.CommunicatorObjects" ], "optionalUnityReferences": [], @@ -15,4 +15,4 @@ "precompiledReferences": [], "autoReferenced": true, "defineConstraints": [] -} \ No newline at end of file +} diff --git a/com.unity.ml-agents/Runtime/Academy.cs b/com.unity.ml-agents/Runtime/Academy.cs index d014f4aed3..5a8f206521 100644 --- a/com.unity.ml-agents/Runtime/Academy.cs +++ b/com.unity.ml-agents/Runtime/Academy.cs @@ -7,7 +7,7 @@ using Unity.MLAgents.Inference; using Unity.MLAgents.Policies; using Unity.MLAgents.SideChannels; -using Barracuda; +using Unity.Barracuda; /** * 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 1bb58bb19c..5f3e0aa550 100644 --- a/com.unity.ml-agents/Runtime/Agent.cs +++ b/com.unity.ml-agents/Runtime/Agent.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using UnityEngine; -using Barracuda; using Unity.MLAgents.Sensors; using Unity.MLAgents.Demonstrations; using Unity.MLAgents.Policies; +using Unity.Barracuda; using UnityEngine.Serialization; namespace Unity.MLAgents diff --git a/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs b/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs index 7d69bd35b6..c171df5958 100644 --- a/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs +++ b/com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Barracuda; using Unity.MLAgents.Inference.Utils; +using Unity.Barracuda; using UnityEngine; namespace Unity.MLAgents.Inference diff --git a/com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs b/com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs index 3be22f5060..6c9ef913f3 100644 --- a/com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs +++ b/com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Barracuda; using Unity.MLAgents.Sensors; using Unity.MLAgents.Policies; +using Unity.Barracuda; namespace Unity.MLAgents.Inference { @@ -590,7 +590,7 @@ static IEnumerable CheckOutputTensorShape( "suggest Continuous Control."); return failedModelChecks; } - var tensorTester = new Dictionary>(); + var tensorTester = new Dictionary>(); if (brainParameters.VectorActionSpaceType == SpaceType.Continuous) { tensorTester[TensorNames.ActionOutput] = CheckContinuousActionOutputShape; @@ -604,7 +604,7 @@ static IEnumerable CheckOutputTensorShape( { if (tensorTester.ContainsKey(name)) { - var tester = tensorTester[name]; + Func tester = tensorTester[name]; var error = tester.Invoke(brainParameters, model.GetShapeByName(name), modelActionSize); if (error != null) { @@ -631,7 +631,7 @@ static IEnumerable CheckOutputTensorShape( /// check failed. If the check passed, returns null. /// static string CheckDiscreteActionOutputShape( - BrainParameters brainParameters, TensorShape shape, int modelActionSize) + BrainParameters brainParameters, TensorShape? shape, int modelActionSize) { var bpActionSize = brainParameters.VectorActionSize.Sum(); if (modelActionSize != bpActionSize) @@ -656,7 +656,7 @@ static string CheckDiscreteActionOutputShape( /// If the Check failed, returns a string containing information about why the /// check failed. If the check passed, returns null. static string CheckContinuousActionOutputShape( - BrainParameters brainParameters, TensorShape shape, int modelActionSize) + BrainParameters brainParameters, TensorShape? shape, int modelActionSize) { var bpActionSize = brainParameters.VectorActionSize[0]; if (modelActionSize != bpActionSize) diff --git a/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs b/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs index b2f8ded90c..3bf14ee44f 100644 --- a/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs +++ b/com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System; -using Barracuda; using Unity.MLAgents.Inference.Utils; +using Unity.Barracuda; using UnityEngine; using Unity.MLAgents.Sensors; diff --git a/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs b/com.unity.ml-agents/Runtime/Inference/ModelRunner.cs index a6084f086e..584591803a 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 Barracuda; +using Unity.Barracuda; using UnityEngine.Profiling; 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 fcab4e4c4a..6705a71bda 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorApplier.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using Barracuda; using Unity.MLAgents.Policies; +using Unity.Barracuda; 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 62353250ff..af78a1e794 100644 --- a/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs +++ b/com.unity.ml-agents/Runtime/Inference/TensorGenerator.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -using Barracuda; using Unity.MLAgents.Sensors; +using Unity.Barracuda; 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 ba59b8edf1..3dc3ed3c97 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 Barracuda; using Unity.MLAgents.Inference.Utils; +using Unity.Barracuda; namespace Unity.MLAgents.Inference { diff --git a/com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs b/com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs index e13f691fec..6c6bcec4c1 100644 --- a/com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs +++ b/com.unity.ml-agents/Runtime/Policies/BarracudaPolicy.cs @@ -1,4 +1,4 @@ -using Barracuda; +using Unity.Barracuda; using System.Collections.Generic; using Unity.MLAgents.Inference; using Unity.MLAgents.Sensors; diff --git a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs index 224a79eabb..013df3bad4 100644 --- a/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs +++ b/com.unity.ml-agents/Runtime/Policies/BehaviorParameters.cs @@ -1,4 +1,4 @@ -using Barracuda; +using Unity.Barracuda; using System; using UnityEngine; using UnityEngine.Serialization; diff --git a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs index 4afb107e9e..63e4bceb63 100644 --- a/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs +++ b/com.unity.ml-agents/Runtime/Sensors/ObservationWriter.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -using Barracuda; using Unity.MLAgents.Inference; +using Unity.Barracuda; 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 8ded00fdb4..3086da3ac4 100755 --- a/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef +++ b/com.unity.ml-agents/Runtime/Unity.ML-Agents.asmdef @@ -1,7 +1,7 @@ { "name": "Unity.ML-Agents", "references": [ - "Barracuda", + "Unity.Barracuda", "Unity.ML-Agents.CommunicatorObjects" ], "optionalUnityReferences": [], @@ -16,4 +16,4 @@ ], "autoReferenced": true, "defineConstraints": [] -} \ No newline at end of file +} diff --git a/com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs b/com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs index 282f6ab94b..68c87dcaed 100644 --- a/com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs +++ b/com.unity.ml-agents/Tests/Editor/DiscreteActionOutputApplierTest.cs @@ -1,5 +1,5 @@ using System; -using Barracuda; +using Unity.Barracuda; using NUnit.Framework; using UnityEngine; using Unity.MLAgents.Inference; diff --git a/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs b/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs index 6536013d82..178cada91e 100644 --- a/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs +++ b/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorApplier.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using NUnit.Framework; -using Barracuda; using Unity.MLAgents.Inference; using Unity.MLAgents.Policies; +using Unity.Barracuda; namespace Unity.MLAgents.Tests { diff --git a/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs b/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs index 17d12d0396..c5434b842f 100644 --- a/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs +++ b/com.unity.ml-agents/Tests/Editor/EditModeTestInternalBrainTensorGenerator.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Barracuda; +using Unity.Barracuda; using NUnit.Framework; using UnityEngine; using Unity.MLAgents.Inference; diff --git a/com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs b/com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs index e89c5c8a25..d563062315 100644 --- a/com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs +++ b/com.unity.ml-agents/Tests/Editor/ModelRunnerTest.cs @@ -1,9 +1,9 @@ using NUnit.Framework; using UnityEngine; using UnityEditor; -using Barracuda; using Unity.MLAgents.Inference; using Unity.MLAgents.Sensors; +using Unity.Barracuda; using System.Linq; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs b/com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs index 3e6f733ac7..261a4df52f 100644 --- a/com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs +++ b/com.unity.ml-agents/Tests/Editor/ParameterLoaderTest.cs @@ -1,9 +1,9 @@ using NUnit.Framework; using UnityEngine; using UnityEditor; -using Barracuda; using Unity.MLAgents.Inference; using Unity.MLAgents.Sensors; +using Unity.Barracuda; using System.Linq; using Unity.MLAgents.Policies; diff --git a/com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs b/com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs index ac5c0f83ce..9ab95244ab 100644 --- a/com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs +++ b/com.unity.ml-agents/Tests/Editor/Sensor/ObservationWriterTests.cs @@ -1,7 +1,7 @@ using NUnit.Framework; using Unity.MLAgents.Sensors; -using Barracuda; using Unity.MLAgents.Inference; +using Unity.Barracuda; namespace Unity.MLAgents.Tests diff --git a/com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs b/com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs index c1a3251e76..4e3dd61588 100644 --- a/com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs +++ b/com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs @@ -1,7 +1,7 @@ using System; -using Barracuda; using Unity.MLAgents.Inference; using Unity.MLAgents.Inference.Utils; +using Unity.Barracuda; using NUnit.Framework; namespace Unity.MLAgents.Tests 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 0f40d65f6c..6035c9b3e0 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 @@ -3,7 +3,7 @@ "references": [ "Unity.ML-Agents.Editor", "Unity.ML-Agents", - "Barracuda", + "Unity.Barracuda", "Unity.ML-Agents.CommunicatorObjects" ], "optionalUnityReferences": [ @@ -24,4 +24,4 @@ "defineConstraints": [ "UNITY_INCLUDE_TESTS" ] -} \ No newline at end of file +} 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 16cbc07f52..f136f55054 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 @@ -2,7 +2,7 @@ "name": "Tests", "references": [ "Unity.ML-Agents", - "Barracuda", + "Unity.Barracuda", "Unity.ML-Agents.CommunicatorObjects", "Unity.ML-Agents.Editor" ], diff --git a/com.unity.ml-agents/package.json b/com.unity.ml-agents/package.json index 8ab8e20ca4..d03be37394 100755 --- a/com.unity.ml-agents/package.json +++ b/com.unity.ml-agents/package.json @@ -5,6 +5,6 @@ "unity": "2018.4", "description": "Add interactivity to your game with Machine Learning Agents trained using Deep Reinforcement Learning.", "dependencies": { - "com.unity.barracuda": "0.6.3-preview" + "com.unity.barracuda": "0.7.0-preview" } -} \ No newline at end of file +}