Skip to content

Commit 63ebb37

Browse files
authored
[barracuda] Update Barracuda to 0.7.0-preview (#3875)
1 parent 1d71edf commit 63ebb37

28 files changed

+36
-35
lines changed

Project/Assets/ML-Agents/Examples/SharedAssets/Scripts/ModelOverrider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using UnityEngine;
4-
using Barracuda;
4+
using Unity.Barracuda;
55
using System.IO;
66
using Unity.MLAgents;
77
using Unity.MLAgents.Policies;

Project/Assets/ML-Agents/Examples/WallJump/Scripts/WallJumpAgent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Collections;
44
using UnityEngine;
55
using Unity.MLAgents;
6-
using Barracuda;
6+
using Unity.Barracuda;
77
using Unity.MLAgents.Sensors;
88

99
public class WallJumpAgent : Agent

com.unity.ml-agents/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ and this project adheres to
4343
C# style conventions. All public fields and properties now use "PascalCase"
4444
instead of "camelCase"; for example, `Agent.maxStep` was renamed to
4545
`Agent.MaxStep`. For a full list of changes, see the pull request. (#3828)
46+
- Updated to Barracuda 0.7.0-preivew which has breaking namespace and assembly name changes.
4647
#### ml-agents / ml-agents-envs / gym-unity (Python)
4748
- The `--load` and `--train` command-line flags have been deprecated. Training
4849
now happens by default, and use `--resume` to resume training instead. (#3705)

com.unity.ml-agents/Editor/BehaviorParametersEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Unity.MLAgents.Sensors;
22
using UnityEditor;
3-
using Barracuda;
43
using Unity.MLAgents.Policies;
4+
using Unity.Barracuda;
55
using UnityEngine;
66

77
namespace Unity.MLAgents.Editor

com.unity.ml-agents/Editor/Unity.ML-Agents.Editor.asmdef

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Unity.ML-Agents.Editor",
33
"references": [
44
"Unity.ML-Agents",
5-
"Barracuda",
5+
"Unity.Barracuda",
66
"Unity.ML-Agents.CommunicatorObjects"
77
],
88
"optionalUnityReferences": [],
@@ -15,4 +15,4 @@
1515
"precompiledReferences": [],
1616
"autoReferenced": true,
1717
"defineConstraints": []
18-
}
18+
}

com.unity.ml-agents/Runtime/Academy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using Unity.MLAgents.Inference;
88
using Unity.MLAgents.Policies;
99
using Unity.MLAgents.SideChannels;
10-
using Barracuda;
10+
using Unity.Barracuda;
1111

1212
/**
1313
* Welcome to Unity Machine Learning Agents (ML-Agents).

com.unity.ml-agents/Runtime/Agent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using UnityEngine;
5-
using Barracuda;
65
using Unity.MLAgents.Sensors;
76
using Unity.MLAgents.Demonstrations;
87
using Unity.MLAgents.Policies;
8+
using Unity.Barracuda;
99
using UnityEngine.Serialization;
1010

1111
namespace Unity.MLAgents

com.unity.ml-agents/Runtime/Inference/ApplierImpl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Barracuda;
54
using Unity.MLAgents.Inference.Utils;
5+
using Unity.Barracuda;
66
using UnityEngine;
77

88
namespace Unity.MLAgents.Inference

com.unity.ml-agents/Runtime/Inference/BarracudaModelParamLoader.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4-
using Barracuda;
54
using Unity.MLAgents.Sensors;
65
using Unity.MLAgents.Policies;
6+
using Unity.Barracuda;
77

88
namespace Unity.MLAgents.Inference
99
{
@@ -590,7 +590,7 @@ static IEnumerable<string> CheckOutputTensorShape(
590590
"suggest Continuous Control.");
591591
return failedModelChecks;
592592
}
593-
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape, int, string>>();
593+
var tensorTester = new Dictionary<string, Func<BrainParameters, TensorShape?, int, string>>();
594594
if (brainParameters.VectorActionSpaceType == SpaceType.Continuous)
595595
{
596596
tensorTester[TensorNames.ActionOutput] = CheckContinuousActionOutputShape;
@@ -604,7 +604,7 @@ static IEnumerable<string> CheckOutputTensorShape(
604604
{
605605
if (tensorTester.ContainsKey(name))
606606
{
607-
var tester = tensorTester[name];
607+
Func<BrainParameters, TensorShape?, int, string> tester = tensorTester[name];
608608
var error = tester.Invoke(brainParameters, model.GetShapeByName(name), modelActionSize);
609609
if (error != null)
610610
{
@@ -631,7 +631,7 @@ static IEnumerable<string> CheckOutputTensorShape(
631631
/// check failed. If the check passed, returns null.
632632
/// </returns>
633633
static string CheckDiscreteActionOutputShape(
634-
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
634+
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
635635
{
636636
var bpActionSize = brainParameters.VectorActionSize.Sum();
637637
if (modelActionSize != bpActionSize)
@@ -656,7 +656,7 @@ static string CheckDiscreteActionOutputShape(
656656
/// <returns>If the Check failed, returns a string containing information about why the
657657
/// check failed. If the check passed, returns null.</returns>
658658
static string CheckContinuousActionOutputShape(
659-
BrainParameters brainParameters, TensorShape shape, int modelActionSize)
659+
BrainParameters brainParameters, TensorShape? shape, int modelActionSize)
660660
{
661661
var bpActionSize = brainParameters.VectorActionSize[0];
662662
if (modelActionSize != bpActionSize)

com.unity.ml-agents/Runtime/Inference/GeneratorImpl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Collections.Generic;
22
using System;
3-
using Barracuda;
43
using Unity.MLAgents.Inference.Utils;
4+
using Unity.Barracuda;
55
using UnityEngine;
66
using Unity.MLAgents.Sensors;
77

0 commit comments

Comments
 (0)