浏览代码
Automatically generate samples based on placement of mlagents-sample.json files in our examples. (#5077)
/develop/gail-srl-hack
Automatically generate samples based on placement of mlagents-sample.json files in our examples. (#5077)
/develop/gail-srl-hack
GitHub
4 年前
当前提交
67dbdad6
共有 10 个文件被更改,包括 112 次插入 和 130 次删除
-
8.yamato/com.unity.ml-agents-pack.yml
-
111Project/Assets/ML-Agents/Editor/Tests/SampleExporter.cs
-
3Project/Packages/manifest.json
-
1Project/Project.sln.DotSettings
-
4com.unity.ml-agents/.gitignore
-
50ml-agents/tests/yamato/yamato_utils.py
-
7Project/Assets/ML-Agents/Examples/3DBall/mlagents-sample.json
-
7Project/Assets/ML-Agents/Examples/3DBall/mlagents-sample.json.meta
-
22.yamato/ml-agents-sample-export.yml
-
29ml-agents/tests/yamato/sample_curation.py
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ML/@EntryIndexedValue">ML</s:String> |
|||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Dont/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
|
|||
{ |
|||
"displayName": "3D Ball", |
|||
"description": "The 3D Ball sample is a simple environment that is a great for jumping into Ml-Agents to see how things work.", |
|||
"scenes": [ |
|||
"Scenes/3DBall.unity" |
|||
] |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 6b6f1c189dc84df391d1c3ccb13a54f7 |
|||
TextScriptImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
sample_export: |
|||
name: Samples Export 2021.2 |
|||
agent: |
|||
type: Unity::VM |
|||
image: package-ci/ubuntu:stable |
|||
flavor: b1.large |
|||
variables: |
|||
UNITY_VERSION: 2021.2 |
|||
commands: |
|||
- 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 2021.2 -c editor --wait --fast |
|||
- python3 -u -m ml-agents.tests.yamato.sample_curation --scene "Assets/ML-Agents/Examples/Basic/Scenes/Basic.unity" "Assets/ML-Agents/Examples/Match3/Scenes/Match3.unity" "Assets/ML-Agents/Examples/WallJump/Scenes/WallJump.unity" "Assets/ML-Agents/TestScenes/TestCompressedGrid/TestGridCompressed.unity" "Assets/ML-Agents/TestScenes/TestCompressedTexture/TestTextureCompressed.unity" |
|||
triggers: |
|||
cancel_old_ci: true |
|||
artifacts: |
|||
logs: |
|||
paths: |
|||
- "artifacts/sample_export.txt" |
|||
samples: |
|||
paths: |
|||
- "artifacts/Samples/**" |
|
|||
import sys |
|||
import argparse |
|||
|
|||
from .yamato_utils import get_base_path, create_samples |
|||
|
|||
|
|||
def main(scenes): |
|||
base_path = get_base_path() |
|||
print(f"Running in base path {base_path}") |
|||
|
|||
returncode = create_samples( |
|||
scenes, |
|||
base_path, |
|||
log_output_path=None, # Log to stdout so we get timestamps on the logs |
|||
) |
|||
|
|||
if returncode == 0: |
|||
print("Test run SUCCEEDED!") |
|||
else: |
|||
print("Test run FAILED!") |
|||
|
|||
sys.exit(returncode) |
|||
|
|||
|
|||
if __name__ == "__main__": |
|||
parser = argparse.ArgumentParser() |
|||
parser.add_argument("--scene", nargs="+", default=None, required=True) |
|||
args = parser.parse_args() |
|||
main(args.scene) |
撰写
预览
正在加载...
取消
保存
Reference in new issue