Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
keys:
# Parameterize the cache so that different python versions can get different versions of the packages
- v1-dependencies-py<< parameters.pyversion >>-{{ checksum "python_deps.txt" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-py<< parameters.pyversion >>-

- run:
name: Install Dependencies
Expand Down
34 changes: 20 additions & 14 deletions .yamato/csharp-tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Mac Edit Mode Tests
triggers:
test_editors:
- version: 2017.4
- version: 2018.4
- version: 2019.3
---
{% for editor in test_editors %}
test_mac_editmode_{{ editor.version }}:
name: Test Mac EditMode {{ editor.version }}
agent:
type: Unity::VM::osx
image: ml-agents/ml-agents-bokken-mac:stable
flavor: i1.small
variables:
UNITY_VERSION: {{ editor.version }}
commands:
- ./run-tests-editmode-osx-editor.sh
triggers:
branches:
only:
- "/develop-.*/"
- "/develop-.*/"
targets:
only:
- "develop"
- "develop"
pull_requests:
- targets:
only:
- "master"
- "/release-.*/"
- "/hotfix-.*/"

agent:
type: Unity::VM::osx
image: ml-agents/ml-agents-bokken-mac:stable
flavor: i1.small

variables:
LC_ALL: "en_US.UTF-8"
commands:
- ./run-tests-editmode-osx-editor.sh
{% endfor %}
54 changes: 30 additions & 24 deletions .yamato/standalone-build-test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Mac Standalone Build Test
triggers:
branches:
only:
- "/develop-.*/"
targets:
only:
- "develop"
pull_requests:
- targets:
only:
- "master"
- "/release-.*/"
- "/hotfix-.*/"

agent:
type: Unity::VM::osx
image: ml-agents/ml-agents-bokken-mac:stable
flavor: i1.small

variables:
LC_ALL: "en_US.UTF-8"
commands:
- ./run-standalone-build-osx.sh
test_editors:
- version: 2017.4
- version: 2018.4
- version: 2019.3
---
{% for editor in test_editors %}
test_mac_standalone_{{ editor.version }}:
name: Test Mac Standalone {{ editor.version }}
agent:
type: Unity::VM::osx
image: ml-agents/ml-agents-bokken-mac:stable
flavor: i1.small
variables:
UNITY_VERSION: {{ editor.version }}
commands:
- ./run-standalone-build-osx.sh
triggers:
branches:
only:
- "/develop-.*/"
targets:
only:
- "develop"
pull_requests:
- targets:
only:
- "master"
- "/release-.*/"
- "/hotfix-.*/"
{% endfor %}
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ public byte[] GetCompressedObservation()
return null;
}

public CompressionType GetCompressionType()
public SensorCompressionType GetCompressionType()
{
return CompressionType.None;
return SensorCompressionType.None;
}

public string GetName()
Expand Down
29 changes: 25 additions & 4 deletions UnitySDK/Assets/ML-Agents/Editor/Tests/StandaloneBuildTest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System;
using UnityEditor;
using UnityEngine;
#if UNITY_2018_1_OR_NEWER
using UnityEditor.Build.Reporting;
#endif

namespace MLAgents
{
Expand All @@ -9,19 +12,37 @@ public class StandaloneBuildTest
static void BuildStandalonePlayerOSX()
{
string[] scenes = { "Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity" };
var error = BuildPipeline.BuildPlayer(scenes, "testPlayer", BuildTarget.StandaloneOSX, BuildOptions.None);
if (string.IsNullOrEmpty(error))
var buildResult = BuildPipeline.BuildPlayer(scenes, "testPlayer", BuildTarget.StandaloneOSX, BuildOptions.None);
#if UNITY_2018_1_OR_NEWER
var isOK = buildResult.summary.result == BuildResult.Succeeded;
var error = "";
foreach (var stepInfo in buildResult.steps)
{
foreach (var msg in stepInfo.messages)
{
if (msg.type != LogType.Log && msg.type != LogType.Warning)
{
error += msg.content + "\n";
}
}
}
#else
var error = buildResult;
var isOK = string.IsNullOrEmpty(error);
#endif
if (isOK)
{
EditorApplication.Exit(0);
}
else
{
Console.Error.WriteLine(error);
EditorApplication.Exit(1);

}
Debug.Log(error);

}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3686,7 +3686,6 @@ MonoBehaviour:
vectorObservationSize: 53
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
cameraResolutions: []
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: d32fca21cf4c04536ab7f88eb9de83e0, type: 3}
Expand All @@ -3705,8 +3704,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
agentParameters:
agentCameras: []
agentRenderTextures: []
maxStep: 5000
resetOnDone: 1
onDemandDecision: 0
Expand Down Expand Up @@ -3750,8 +3747,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
agentParameters:
agentCameras: []
agentRenderTextures: []
maxStep: 5000
resetOnDone: 1
onDemandDecision: 0
Expand All @@ -3763,7 +3758,7 @@ MonoBehaviour:
badMaterial: {fileID: 2100000, guid: 88b9ae7af2c1748a0a1f63407587a601, type: 2}
goodMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
frozenMaterial: {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
myLaser: {fileID: 1081721624670010}
myLaser: {fileID: 1617924810425504}
contribute: 0
useVectorObs: 1
--- !u!114 &114192565006091356
Expand All @@ -3789,8 +3784,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
agentParameters:
agentCameras: []
agentRenderTextures: []
maxStep: 5000
resetOnDone: 1
onDemandDecision: 0
Expand All @@ -3802,7 +3795,7 @@ MonoBehaviour:
badMaterial: {fileID: 2100000, guid: 88b9ae7af2c1748a0a1f63407587a601, type: 2}
goodMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
frozenMaterial: {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
myLaser: {fileID: 1081721624670010}
myLaser: {fileID: 1045923826166930}
contribute: 0
useVectorObs: 1
--- !u!114 &114374774605792098
Expand All @@ -3820,7 +3813,6 @@ MonoBehaviour:
vectorObservationSize: 53
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
cameraResolutions: []
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: d32fca21cf4c04536ab7f88eb9de83e0, type: 3}
Expand Down Expand Up @@ -3853,7 +3845,6 @@ MonoBehaviour:
vectorObservationSize: 53
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
cameraResolutions: []
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: d32fca21cf4c04536ab7f88eb9de83e0, type: 3}
Expand All @@ -3872,8 +3863,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
agentParameters:
agentCameras: []
agentRenderTextures: []
maxStep: 5000
resetOnDone: 1
onDemandDecision: 0
Expand All @@ -3885,7 +3874,7 @@ MonoBehaviour:
badMaterial: {fileID: 2100000, guid: 88b9ae7af2c1748a0a1f63407587a601, type: 2}
goodMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
frozenMaterial: {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
myLaser: {fileID: 1081721624670010}
myLaser: {fileID: 1421240237750412}
contribute: 0
useVectorObs: 1
--- !u!114 &114661830999747712
Expand All @@ -3911,8 +3900,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
agentParameters:
agentCameras: []
agentRenderTextures: []
maxStep: 5000
resetOnDone: 1
onDemandDecision: 0
Expand All @@ -3924,7 +3911,7 @@ MonoBehaviour:
badMaterial: {fileID: 2100000, guid: 88b9ae7af2c1748a0a1f63407587a601, type: 2}
goodMaterial: {fileID: 2100000, guid: c67450f290f3e4897bc40276a619e78d, type: 2}
frozenMaterial: {fileID: 2100000, guid: 66163cf35956a4be08e801b750c26f33, type: 2}
myLaser: {fileID: 1081721624670010}
myLaser: {fileID: 1941433838307300}
contribute: 0
useVectorObs: 1
--- !u!114 &114762047763154270
Expand Down Expand Up @@ -3964,7 +3951,6 @@ MonoBehaviour:
vectorObservationSize: 53
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
cameraResolutions: []
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: d32fca21cf4c04536ab7f88eb9de83e0, type: 3}
Expand All @@ -3986,7 +3972,6 @@ MonoBehaviour:
vectorObservationSize: 53
numStackedVectorObservations: 1
vectorActionSize: 03000000030000000300000002000000
cameraResolutions: []
vectorActionDescriptions: []
vectorActionSpaceType: 0
m_Model: {fileID: 11400000, guid: d32fca21cf4c04536ab7f88eb9de83e0, type: 3}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44971162, g: 0.49977726, b: 0.5756362, a: 1}
m_IndirectSpecularColor: {r: 0.4497121, g: 0.4997778, b: 0.5756369, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -747,9 +747,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4fe57113e76a5426297487dd6faadc5b, type: 3}
m_Name:
m_EditorClassIdentifier:
broadcastHub:
brainsToControl:
- {fileID: 11400000, guid: 9e7865ec29c894c2d8c1617b0fa392f9, type: 2}
m_TrainingConfiguration:
width: 500
height: 500
Expand Down
2 changes: 1 addition & 1 deletion UnitySDK/Assets/ML-Agents/Scripts/Academy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public EnvironmentConfiguration(
"docs/Learning-Environment-Design-Academy.md")]
public abstract class Academy : MonoBehaviour
{
const string k_ApiVersion = "API-10";
const string k_ApiVersion = "API-11";

/// Temporary storage for global gravity value
/// Used to restore oringal value when deriving Academy modifies it
Expand Down
12 changes: 6 additions & 6 deletions UnitySDK/Assets/ML-Agents/Scripts/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public class AgentParameters
/// of the environment extracts its current observation, sends them to its
/// policy and in return receives an action. In practice,
/// however, an agent need not send its observation at every step since very
/// little may have changed between successive steps.
/// little may have changed between successive steps.
///
/// At any step, an agent may be considered <see cref="m_Done"/>.
/// This could occur due to a variety of reasons:
Expand Down Expand Up @@ -319,15 +319,15 @@ void OnDisable()

/// <summary>
/// Updates the Model for the agent. Any model currently assigned to the
/// agent will be replaced with the provided one. If the arguments are
/// agent will be replaced with the provided one. If the arguments are
/// identical to the current parameters of the agent, the model will
/// remain unchanged.
/// remain unchanged.
/// </summary>
/// <param name="behaviorName"> The identifier of the behavior. This
/// will categorize the agent when training.
/// <param name="behaviorName"> The identifier of the behavior. This
/// will categorize the agent when training.
/// </param>
/// <param name="model"> The model to use for inference.</param>
/// <param name = "inferenceDevice"> Define on what device the model
/// <param name = "inferenceDevice"> Define on what device the model
/// will be run.</param>
public void GiveModel(
string behaviorName,
Expand Down
4 changes: 2 additions & 2 deletions UnitySDK/Assets/ML-Agents/Scripts/Sensor/CameraSensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public void WriteToTensor(TensorProxy tensorProxy, int agentIndex)
}
}

public CompressionType GetCompressionType()
public SensorCompressionType GetCompressionType()
{
return CompressionType.PNG;
return SensorCompressionType.PNG;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public struct CompressedObservation
/// <summary>
/// The format of the compressed data
/// </summary>
public CompressionType CompressionType;
public SensorCompressionType CompressionType;

/// <summary>
/// The uncompressed dimensions of the data.
Expand Down
6 changes: 3 additions & 3 deletions UnitySDK/Assets/ML-Agents/Scripts/Sensor/ISensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace MLAgents.Sensor
{
public enum CompressionType
public enum SensorCompressionType
{
None,
PNG
Expand Down Expand Up @@ -38,10 +38,10 @@ public interface ISensor {
byte[] GetCompressedObservation();

/// <summary>
/// Return the compression type being used. If no compression is used, return CompressionType.None
/// Return the compression type being used. If no compression is used, return SensorCompressionType.None
/// </summary>
/// <returns></returns>
CompressionType GetCompressionType();
SensorCompressionType GetCompressionType();

/// <summary>
/// Get the name of the sensor. This is used to ensure deterministic sorting of the sensors on an Agent,
Expand Down
Loading