浏览代码

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
/release_2_verified
GitHub 4 年前
当前提交
ea26ba4f
共有 11 个文件被更改,包括 34 次插入65 次删除
  1. 41
      .yamato/com.unity.ml-agents-test.yml
  2. 17
      .yamato/standalone-build-test.yml
  3. 2
      .yamato/training-int-tests.yml
  4. 1
      Project/Packages/manifest.json
  5. 2
      Project/ProjectSettings/ProjectVersion.txt
  6. 2
      Project/ProjectSettings/UnityConnectSettings.asset
  7. 2
      com.unity.ml-agents/CHANGELOG.md
  8. 2
      com.unity.ml-agents/Runtime/Academy.cs
  9. 10
      com.unity.ml-agents/Tests/Editor/TensorUtilsTest.cs
  10. 2
      com.unity.ml-agents/package.json
  11. 18
      ml-agents/tests/yamato/yamato_utils.py

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


coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
testProject: DevProject
- version: 2020.2
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
testProject: DevProject
trunk_editor:
- version: trunk
- version: 2020.3
coverageOptions: --enable-code-coverage --code-coverage-options 'generateHtmlReport;assemblyFilters:+Unity.ML-Agents'
minCoveragePct: 72
testProject: DevProject

{% endfor %}
{% endfor %}
{% for editor in trunk_editor %}
{% for platform in test_platforms %}
- .yamato/com.unity.ml-agents-test.yml#test_{{ platform.name }}_{{ editor.version }}
{% endfor %}
{% endfor %}
triggers:
cancel_old_ci: true
recurring:

{% endif %}
{% endfor %}
{% endfor %}
{% for editor in trunk_editor %}
{% for platform in test_platforms %}
test_{{ platform.name }}_trunk:
name : com.unity.ml-agents test {{ editor.version }} on {{ platform.name }}
agent:
type: {{ platform.type }}
image: {{ platform.image }}
flavor: {{ platform.flavor}}
commands:
- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- npm install upm-ci-utils@stable -g --registry https://artifactory.prd.cds.internal.unity3d.com/artifactory/api/npm/upm-npm
{% if platform.name == "win" %}
- upm-ci package test -u "C:\build\output\Unity-Technologies\ml-agents\.Editor" --package-path com.unity.ml-agents {{ editor.coverageOptions }}
{% else %}
- upm-ci project test -u {{ editor.version }} --project-path {{ editor.testProject }} {{ editor.coverageOptions }} --extra-utr-arg "reruncount=2"
{% endif %}
- python3 ml-agents/tests/yamato/check_coverage_percent.py upm-ci~/test-results/ {{ editor.minCoveragePct }}
artifacts:
logs:
paths:
- "upm-ci~/test-results/**/*"
dependencies:
- .yamato/com.unity.ml-agents-pack.yml#pack
triggers:
cancel_old_ci: true
{% endfor %}
{% endfor %}

17
.yamato/standalone-build-test.yml


test_editors:
- version: 2018.4
- version: 2020.3
---
{% for editor in test_editors %}
test_mac_standalone_{{ editor.version }}:

image: ml-agents/ml-agents-bokken-mac:0.1.4-492264
image: package-ci/mac:stable
- pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- python -u -m ml-agents.tests.yamato.standalone_build_tests
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
- python -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
- python3 -m pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
- python3 -m pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple --upgrade
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/Bouncer/Scenes/Bouncer.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
triggers:
cancel_old_ci: true
changes:

2
.yamato/training-int-tests.yml


test_editors:
- version: 2018.4
- version: 2020.3
---
{% for editor in test_editors %}
test_mac_training_int_{{ editor.version }}:

1
Project/Packages/manifest.json


"com.unity.ml-agents": "file:../../com.unity.ml-agents",
"com.unity.package-manager-ui": "2.0.13",
"com.unity.package-validation-suite": "0.7.15-preview",
"com.unity.purchasing": "2.2.1",
"com.unity.textmeshpro": "1.4.1",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.animation": "1.0.0",

2
Project/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2018.4.32f1
m_EditorVersion: 2018.4.35f1

2
Project/ProjectSettings/UnityConnectSettings.asset


UnityConnectSettings:
m_ObjectHideFlags: 0
serializedVersion: 1
m_Enabled: 1
m_Enabled: 0
m_TestMode: 0
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events

2
com.unity.ml-agents/CHANGELOG.md


and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [1.0.8] - 2021-05-26
### Bug Fixes
#### com.unity.ml-agents (C#)
- Fixed a null reference exception that occurred when loading an ONNX model file that was generated with a new

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


/// Unity package version of com.unity.ml-agents.
/// This must match the version string in package.json and is checked in a unit test.
/// </summary>
internal const string k_PackageVersion = "1.0.7";
internal const string k_PackageVersion = "1.0.8";
const int k_EditorTrainingPort = 5004;

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


using System;
using System.Text.RegularExpressions;
using Unity.MLAgents.Inference;
using Unity.MLAgents.Inference.Utils;
using Unity.Barracuda;

var packageInfo = UnityEditor.PackageManager.PackageInfo.FindForAssembly(typeof(Tensor).Assembly);
Assert.AreEqual("com.unity.barracuda", packageInfo.name);
var barracuda8DSupport = new Version(1, 1, 0);
var strippedBarracudaVersion = packageInfo.version.Replace("-preview", "");
var versionMatch = Regex.Match(packageInfo.version, @"[0-9]+\.[0-9]+\.[0-9]");
if (!versionMatch.Success)
{
// Couldn't parse barracuda version
return;
}
var strippedBarracudaVersion = versionMatch.Value;
var version = new Version(strippedBarracudaVersion);
if (version <= barracuda8DSupport)
{

2
com.unity.ml-agents/package.json


{
"name": "com.unity.ml-agents",
"displayName": "ML Agents",
"version": "1.0.7",
"version": "1.0.8",
"unity": "2018.4",
"description": "Use state-of-the-art machine learning to create intelligent character behaviors in any Unity environment (games, robotics, film, etc.).",
"dependencies": {

18
ml-agents/tests/yamato/yamato_utils.py


import subprocess
import yaml
from typing import List, Optional
from sys import platform
UNITY_VERSION = os.environ["UNITY_VERSION"]
BOKKEN_UNITY = f"/Users/bokken/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
HUB_UNITY = (
f"/Applications/Unity/Hub/Editor/{UNITY_VERSION}/Unity.app/Contents/MacOS/Unity"
)
if os.path.exists(BOKKEN_UNITY):
return BOKKEN_UNITY
if os.path.exists(HUB_UNITY):
return HUB_UNITY
raise FileNotFoundError("Can't find bokken or hub executables")
if platform == "darwin":
downloader_install_path = "./.Editor/Unity.app/Contents/MacOS/Unity"
else: # if platform == "linux":
downloader_install_path = "./.Editor/Unity"
if os.path.exists(downloader_install_path):
return downloader_install_path
raise FileNotFoundError("Can't find executable from unity-downloader-cli")
def get_base_path():

正在加载...
取消
保存