比较提交

...
此合并请求有变更与目标分支冲突。
/.yamato/training-int-tests.yml
/.yamato/standalone-build-test.yml
/.yamato/test_versions.metafile
/Project/Packages/manifest.json
/Project/Packages/packages-lock.json

13 次代码提交

共有 18 个文件被更改,包括 608 次插入1538 次删除
  1. 17
      Project/Assets/ML-Agents/Editor/Tests/StandaloneBuildTest.cs
  2. 5
      Project/Packages/manifest.json
  3. 16
      Project/Packages/packages-lock.json
  4. 997
      com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
  5. 26
      com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta
  6. 24
      com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs
  7. 8
      ml-agents/tests/yamato/standalone_build_tests.py
  8. 3
      ml-agents/tests/yamato/yamato_utils.py
  9. 3
      .yamato/test_versions.metafile
  10. 8
      .yamato/training-int-tests.yml
  11. 21
      .yamato/standalone-build-test.yml
  12. 1001
      com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
  13. 10
      com.unity.ml-agents/Plugins/ProtoBuffer/link.xml
  14. 7
      com.unity.ml-agents/Plugins/ProtoBuffer/link.xml.meta
  15. 0
      /com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta

17
Project/Assets/ML-Agents/Editor/Tests/StandaloneBuildTest.cs


{
const string k_OutputCommandLineFlag = "--mlagents-build-output-path";
const string k_SceneCommandLineFlag = "--mlagents-build-scene-path";
private const string k_BuildTargetFlag = "--mlagents-build-target";
const string k_BuildTargetFlag = "--mlagents-build-target";
const string k_ScriptingBackendFlag = "--mlagents-scripting-backend";
public static void BuildStandalonePlayerOSX()
{

var buildTarget = BuildTarget.StandaloneOSX;
var scriptingBackend = ScriptingImplementation.Mono2x;
var args = Environment.GetCommandLineArgs();
for (var i = 0; i < args.Length - 1; i++)

{
buildTarget = (BuildTarget)Enum.Parse(typeof(BuildTarget), args[i + 1], ignoreCase: true);
}
else if (args[i] == k_ScriptingBackendFlag)
{
var val = args[i + 1];
if (val == "mono")
{
scriptingBackend = ScriptingImplementation.Mono2x;
}
else
{
scriptingBackend = ScriptingImplementation.IL2CPP;
}
}
PlayerSettings.SetScriptingBackend(BuildTargetGroup.Standalone, scriptingBackend);
var buildResult = BuildPipeline.BuildPlayer(
scenes,
outputPath,

5
Project/Packages/manifest.json


"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0"
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.sysroot.linux-x86_64": "0.1.15-preview",
"com.unity.toolchain.win-x86_64-linux-x86_64": "0.1.17-preview",
"com.unity.sysroot": "0.1.17-preview"
},
"testables": [
"com.unity.ml-agents",

16
Project/Packages/packages-lock.json


"url": "https://packages.unity.com"
},
"com.unity.sysroot.linux-x86_64": {
"version": "0.1.14-preview",
"depth": 1,
"version": "0.1.15-preview",
"depth": 0,
"com.unity.sysroot": "0.1.18-preview"
"com.unity.sysroot": "0.1.19-preview"
},
"url": "https://packages.unity.com"
},

"dependencies": {
"com.unity.sysroot": "0.1.19-preview",
"com.unity.sysroot.linux-x86_64": "0.1.14-preview"
},
"url": "https://packages.unity.com"
},
"com.unity.toolchain.win-x86_64-linux-x86_64": {
"version": "0.1.17-preview",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.sysroot": "0.1.17-preview",
"com.unity.sysroot.linux-x86_64": "0.1.13-preview"
},
"url": "https://packages.unity.com"
},

997
com.unity.ml-agents/Plugins/ProtoBuffer/Grpc.Core.dll
文件差异内容过多而无法显示
查看文件

26
com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta


iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isPreloaded: 1
'': Any
: Any
second:
enabled: 0
settings:

Exclude OSXIntel: 0
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude Win: 1
Exclude Win64: 1
Exclude Win: 0
Exclude Win64: 0
'': OSXIntel
: OSXIntel
'': OSXIntel64
: OSXIntel64
second:
enabled: 1
settings: {}

second:
enabled: 1
settings:
CPU: x86_64
CPU: AnyCPU
DefaultValueInitialized: true
OS: OSX
- first:

second:
enabled: 0
settings:
CPU: AnyCPU
CPU: None
- first:
Standalone: LinuxUniversal
second:

second:
enabled: 1
settings:
CPU: AnyCPU
CPU: x86_64
enabled: 0
enabled: 1
CPU: AnyCPU
CPU: None
enabled: 0
enabled: 1
CPU: AnyCPU
CPU: None
- first:
iPhone: iOS
second:

24
com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs


#define MLA_SUPPORTED_TRAINING_PLATFORM
#endif
# if MLA_SUPPORTED_TRAINING_PLATFORM
#if MLA_SUPPORTED_TRAINING_PLATFORM
using Grpc.Core;
#if UNITY_EDITOR
using UnityEditor;

/// The Unity to External client.
UnityToExternalProto.UnityToExternalProtoClient m_Client;
Channel m_Channel;
/// <summary>
/// Initializes a new instance of the RPCCommunicator class.

Debug.Log($"Unexpected exception when trying to initialize communication: {ex}");
}
initParametersOut = new UnityRLInitParameters();
m_Channel.ShutdownAsync().Wait();
return false;
}

UpdateEnvironmentWithInput(input.RlInput);
initParametersOut = initializationInput.RlInitializationInput.ToUnityRLInitParameters();
// Be sure to shut down the grpc channel when the application is quitting.
Application.quitting += NotifyQuitAndShutDownChannel;
return true;
#else
initParametersOut = new UnityRLInitParameters();

UnityInputProto Initialize(int port, UnityOutputProto unityOutput, out UnityInputProto unityInput)
{
m_IsOpen = true;
var channel = new Channel($"localhost:{port}", ChannelCredentials.Insecure);
m_Channel = new Channel($"localhost:{port}", ChannelCredentials.Insecure);
m_Client = new UnityToExternalProto.UnityToExternalProtoClient(channel);
m_Client = new UnityToExternalProto.UnityToExternalProtoClient(m_Channel);
var result = m_Client.Exchange(WrapMessage(unityOutput, 200));
var inputMessage = m_Client.Exchange(WrapMessage(null, 200));
unityInput = inputMessage.UnityInput;

if (result.Header.Status != 200 || inputMessage.Header.Status != 200)
{
m_IsOpen = false;
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
void NotifyQuitAndShutDownChannel()
{
QuitCommandReceived?.Invoke();
m_Channel.ShutdownAsync().Wait();
}
#endregion
#region Destruction

{
case CommandProto.Quit:
{
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return;
}
case CommandProto.Reset:

// Not sure if the quit command is actually sent when a
// non 200 message is received. Notify that we are indeed
// quitting.
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return message.UnityInput;
}
catch (Exception ex)

}
m_IsOpen = false;
QuitCommandReceived?.Invoke();
NotifyQuitAndShutDownChannel();
return null;
}
}

8
ml-agents/tests/yamato/standalone_build_tests.py


from .yamato_utils import get_base_path, run_standalone_build
def main(scene_path, build_target):
def main(scene_path, build_target, mlagents_scripting_backend):
base_path = get_base_path()
print(f"Running in base path {base_path}")

output_path=executable_name,
scene_path=scene_path,
build_target=build_target,
scripting_backend=mlagents_scripting_backend,
log_output_path=None, # Log to stdout so we get timestamps on the logs
)

parser.add_argument(
"--build-target", default="mac", choices=["mac", "linux", "ios", "webgl"]
)
parser.add_argument(
"--mlagents-scripting-backend", default="mono", choices=["mono", "il2cpp"]
)
main(args.scene, args.build_target)
main(args.scene, args.build_target, args.mlagents_scripting_backend)

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


output_path: str = None,
scene_path: str = None,
build_target: str = None,
scripting_backend: str = "mono",
log_output_path: Optional[str] = f"{get_base_output_path()}/standalone_build.txt",
) -> int:
"""

test_args += ["--mlagents-build-scene-path", scene_path]
if build_target_enum is not None:
test_args += ["--mlagents-build-target", build_target_enum]
if scripting_backend != "mono":
test_args += ["--mlagents-scripting-backend", scripting_backend]
print(f"{' '.join(test_args)} ...")
timeout = 30 * 60 # 30 minutes, just in case

3
.yamato/test_versions.metafile


extra_test: sensor
- version: 2021.1
extra_test: llapi
scripting_backends:
- backend: mono
- backend: il2cpp

8
.yamato/training-int-tests.yml


{% metadata_file .yamato/test_versions.metafile %}
---
{% for editor in test_editors %}
test_linux_training_int_{{ editor.version }}:
name: Test Linux Fast Training {{ editor.version }}
{% for backend in scripting_backends %}
test_linux_training_int_{{ editor.version }}_{{ backend.backend }}:
name: Test Linux Fast Training {{ editor.version }} {{ backend.backend }}
agent:
type: Unity::VM
image: package-ci/ubuntu:v1.3.1-719011

python -m pip install pyyaml --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
python -u -m ml-agents.tests.yamato.training_int_tests
dependencies:
- .yamato/standalone-build-test.yml#test_linux_standalone_{{ editor.version }}
- .yamato/standalone-build-test.yml#test_linux_standalone_{{ editor.version }}_{{ backend.backend }}
triggers:
cancel_old_ci: true
expression: |

- "artifacts/testPlayer*/**"
- "artifacts/models/**"
{% endfor %}
{% endfor %}

21
.yamato/standalone-build-test.yml


{% metadata_file .yamato/test_versions.metafile %}
---
{% for editor in test_editors %}
test_linux_standalone_{{ editor.version }}:
name: Test Linux Standalone {{ editor.version }}
{% for backend in scripting_backends %}
test_linux_standalone_{{ editor.version }}_{{ backend.backend }}:
name: Test Linux Standalone {{ editor.version }} {{ backend.backend }}
agent:
type: Unity::VM
image: package-ci/ubuntu:v1.3.1-719011

commands:
- sudo apt-get install -y lld
- unity-downloader-cli -u {{ editor.version }} -c editor --wait --fast
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Match3/Scenes/Match3.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedTexture/TestTextureCompressed.unity
- unity-downloader-cli -u {{ editor.version }} -c editor -c il2cpp --wait --fast
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --mlagents-scripting-backend={{ backend.backend }}
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity --mlagents-scripting-backend={{ backend.backend }}
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/Match3/Scenes/Match3.unity --mlagents-scripting-backend={{ backend.backend }}
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity --mlagents-scripting-backend={{ backend.backend }}
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity --mlagents-scripting-backend={{ backend.backend }}
- python3 -u -m ml-agents.tests.yamato.standalone_build_tests --build-target=linux --scene=Assets/ML-Agents/TestScenes/TestCompressedTexture/TestTextureCompressed.unity --mlagents-scripting-backend={{ backend.backend }}
triggers:
cancel_old_ci: true
expression: |

- "artifacts/testPlayer*/**"
- "artifacts/**/UnityPlayer.so"
{% endfor %}
{% endfor %}

1001
com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
文件差异内容过多而无法显示
查看文件

10
com.unity.ml-agents/Plugins/ProtoBuffer/link.xml


<?xml version="1.0" encoding="utf-8"?>
<linker>
<!--
Prevents Managed code stripping from removing code necessary for training.
You may wish to disable this preservation (that is, re-enable code stripping) to
reduce code size if you no longer need training.
See also https://docs.unity3d.com/Manual/ManagedCodeStripping.html
-->
<assembly fullname="Grpc.Core" preserve="all"/>
</linker>

7
com.unity.ml-agents/Plugins/ProtoBuffer/link.xml.meta


fileFormatVersion: 2
guid: f94355fa6eab94c2d8529747b92ca3e1
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle.meta → /com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.bundle.meta

部分文件因为文件数量过多而无法显示

正在加载...
取消
保存