Skip to content

Commit fefd3d0

Browse files
author
Chris Elion
authored
update to 1.0.8 (#5395)
* update to 1.0.8 * remove com.unity.purchasing dep from project * remove 2018.4 from tests, make sure to user 2020.3 * copy yamato util from main * test 2020.3 (not .2) * use downloader in standalone build test * remove trunk tests, fix version parsing in unit test * add 2018.4 back to package tests
1 parent d69ce6c commit fefd3d0

File tree

11 files changed

+34
-65
lines changed

11 files changed

+34
-65
lines changed

.yamato/com.unity.ml-agents-test.yml

+1-40
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ test_editors:
1313
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
1414
minCoveragePct: 72
1515
testProject: DevProject
16-
- version: 2020.2
17-
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
18-
minCoveragePct: 72
19-
testProject: DevProject
20-
trunk_editor:
21-
- version: trunk
16+
- version: 2020.3
2217
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
2318
minCoveragePct: 72
2419
testProject: DevProject
@@ -46,11 +41,6 @@ all_package_tests:
4641
{% endfor %}
4742
{% endfor %}
4843

49-
{% for editor in trunk_editor %}
50-
{% for platform in test_platforms %}
51-
- .yamato/com.unity.ml-agents-test.yml#test_{{ platform.name }}_{{ editor.version }}
52-
{% endfor %}
53-
{% endfor %}
5444
triggers:
5545
cancel_old_ci: true
5646
recurring:
@@ -87,32 +77,3 @@ test_{{ platform.name }}_{{ editor.version }}:
8777
{% endif %}
8878
{% endfor %}
8979
{% endfor %}
90-
91-
{% for editor in trunk_editor %}
92-
{% for platform in test_platforms %}
93-
test_{{ platform.name }}_trunk:
94-
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
95-
agent:
96-
type: {{ platform.type }}
97-
image: {{ platform.image }}
98-
flavor: {{ platform.flavor}}
99-
commands:
100-
- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
101-
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
102-
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
103-
{% if platform.name == "win" %}
104-
- upm-ci package test -u "C:\build\output\Unity-Technologies\ml-agents\.Editor" --package-path com.unity.ml-agents {{ editor.coverageOptions }}
105-
{% else %}
106-
- upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} {{ editor.coverageOptions }} --extra-utr-arg "reruncount=2"
107-
{% endif %}
108-
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
109-
artifacts:
110-
logs:
111-
paths:
112-
- "upm-ci~/test-results/**/*"
113-
dependencies:
114-
- .yamato/com.unity.ml-agents-pack.yml#pack
115-
triggers:
116-
cancel_old_ci: true
117-
{% endfor %}
118-
{% endfor %}

.yamato/standalone-build-test.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
test_editors:
2-
- version: 2018.4
32
- version: 2019.3
3+
- version: 2020.3
44
---
55
{% for editor in test_editors %}
66
test_mac_standalone_{{ editor.version }}:
77
name: Test Mac Standalone {{ editor.version }}
88
agent:
99
type: Unity::VM::osx
10-
image: ml-agents/ml-agents-bokken-mac:0.1.4-492264
10+
image: package-ci/mac:stable
1111
flavor: i1.small
1212
variables:
1313
UNITY_VERSION: {{ editor.version }}
1414
commands:
15-
- pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16-
- python -u -m ml-agents.tests.yamato.standalone_build_tests
17-
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
18-
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
19-
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
15+
- python3 -m pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16+
- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
17+
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
18+
19+
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests
20+
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
21+
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
22+
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
2023
triggers:
2124
cancel_old_ci: true
2225
changes:

.yamato/training-int-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
test_editors:
2-
- version: 2018.4
32
- version: 2019.3
3+
- version: 2020.3
44
---
55
{% for editor in test_editors %}
66
test_mac_training_int_{{ editor.version }}:

Project/Packages/manifest.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"com.unity.ml-agents": "file:../../com.unity.ml-agents",
77
"com.unity.package-manager-ui": "2.0.13",
88
"com.unity.package-validation-suite": "0.7.15-preview",
9-
"com.unity.purchasing": "2.2.1",
109
"com.unity.textmeshpro": "1.4.1",
1110
"com.unity.modules.ai": "1.0.0",
1211
"com.unity.modules.animation": "1.0.0",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
m_EditorVersion: 2018.4.32f1
1+
m_EditorVersion: 2018.4.35f1

Project/ProjectSettings/UnityConnectSettings.asset

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
UnityConnectSettings:
55
m_ObjectHideFlags: 0
66
serializedVersion: 1
7-
m_Enabled: 1
7+
m_Enabled: 0
88
m_TestMode: 0
99
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
1010
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events

com.unity.ml-agents/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9-
## [Unreleased]
9+
## [1.0.8] - 2021-05-26
1010
### Bug Fixes
1111
#### com.unity.ml-agents (C#)
1212
- Fixed a null reference exception that occurred when loading an ONNX model file that was generated with a new

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class Academy : IDisposable
7777
/// Unity package version of com.unity.ml-agents.
7878
/// This must match the version string in package.json and is checked in a unit test.
7979
/// </summary>
80-
internal const string k_PackageVersion = "1.0.7";
80+
internal const string k_PackageVersion = "1.0.8";
8181

8282
const int k_EditorTrainingPort = 5004;
8383

com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Text.RegularExpressions;
23
using Unity.MLAgents.Inference;
34
using Unity.MLAgents.Inference.Utils;
45
using Unity.Barracuda;
@@ -24,7 +25,14 @@ public void TestResizeTensor(int dimension)
2425
var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(Tensor).Assembly);
2526
Assert.AreEqual("com.unity.barracuda", packageInfo.name);
2627
var barracuda8DSupport = new Version(1, 1, 0);
27-
var strippedBarracudaVersion = packageInfo.version.Replace("-preview", "");
28+
29+
var versionMatch = Regex.Match(packageInfo.version, @"[0-9]+\.[0-9]+\.[0-9]");
30+
if (!versionMatch.Success)
31+
{
32+
// Couldn't parse barracuda version
33+
return;
34+
}
35+
var strippedBarracudaVersion = versionMatch.Value;
2836
var version = new Version(strippedBarracudaVersion);
2937
if (version <= barracuda8DSupport)
3038
{

com.unity.ml-agents/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.unity.ml-agents",
33
"displayName": "ML Agents",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"unity": "2018.4",
66
"description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).",
77
"dependencies": {

ml-agents/tests/yamato/yamato_utils.py

+8-10
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
import subprocess
44
import yaml
55
from typing import List, Optional
6+
from sys import platform
67

78

89
def get_unity_executable_path():
9-
UNITY_VERSION = os.environ["UNITY_VERSION"]
10-
BOKKEN_UNITY = f"/Users/bokken/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
11-
HUB_UNITY = (
12-
f"/Applications/Unity/Hub/Editor/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
13-
)
14-
if os.path.exists(BOKKEN_UNITY):
15-
return BOKKEN_UNITY
16-
if os.path.exists(HUB_UNITY):
17-
return HUB_UNITY
18-
raise FileNotFoundError("Can't find bokken or hub executables")
10+
if platform == "darwin":
11+
downloader_install_path = "./.Editor/Unity.app/Contents/MacOS/Unity"
12+
else: # if platform == "linux":
13+
downloader_install_path = "./.Editor/Unity"
14+
if os.path.exists(downloader_install_path):
15+
return downloader_install_path
16+
raise FileNotFoundError("Can't find executable from unity-downloader-cli")
1917

2018

2119
def get_base_path():

0 commit comments

Comments
 (0)