比较提交

...
此合并请求有变更与目标分支冲突。
/Project/Assets/ML-Agents/Examples/3DBall/Scripts/Ball3DAgent.cs

3 次代码提交

作者 SHA1 备注 提交日期
Chris Elion 7a48e5ea remove redundant default arg 5 年前
Chris Elion 52741f5f add metafile 5 年前
Andrew Cohen a0dc8789 test new sampling method 5 年前
共有 3 个文件被更改,包括 52 次插入18 次删除
  1. 1
      Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs
  2. 58
      utils/validate_meta_files.py
  3. 11
      com.unity.ml-agents/Runtime/Sensors/Reflection/EnumReflectionSensor.cs.meta

1
Project/Assets/ML-Agents/Examples/PushBlock/Scripts/PushAgentBasic.cs


var action = Mathf.FloorToInt(act[0]);
// Goalies and Strikers have slightly different action spaces.
switch (action)
{
case 1:

58
utils/validate_meta_files.py


def main():
asset_path = "Project/Assets"
asset_paths = ["Project/Assets", "com.unity.ml-agents"]
whitelist = frozenset(
[
"com.unity.ml-agents/.editorconfig",
"com.unity.ml-agents/.gitignore",
"com.unity.ml-agents/.npmignore",
"com.unity.ml-agents/Tests/.tests.json",
]
)
ignored_dirs = {"Documentation~"}
for root, dirs, files in os.walk(asset_path):
dirs = set(dirs)
files = set(files)
for asset_path in asset_paths:
for root, dirs, files in os.walk(asset_path):
# Modifying the dirs list with topdown=True (the default) will prevent us from recursing those directories
for ignored in ignored_dirs:
try:
dirs.remove(ignored)
except ValueError:
pass
combined = dirs | files
for f in combined:
if f.endswith(python_suffix):
# Probably this script; skip it
continue
dirs = set(dirs)
files = set(files)
# We expect each non-.meta file to have a .meta file, and each .meta file to have a non-.meta file
if f.endswith(meta_suffix):
expected = f.replace(meta_suffix, "")
else:
expected = f + meta_suffix
combined = dirs | files
for f in combined:
if f.endswith(python_suffix):
# Probably this script; skip it
continue
full_path = os.path.join(root, f)
if full_path in whitelist:
continue
# We expect each non-.meta file to have a .meta file, and each .meta file to have a non-.meta file
if f.endswith(meta_suffix):
expected = f.replace(meta_suffix, "")
else:
expected = f + meta_suffix
if expected not in combined:
unmatched.add(os.path.join(root, f))
else:
num_matched += 1
if expected not in combined:
unmatched.add(full_path)
else:
num_matched += 1
if unmatched:
raise Exception(

11
com.unity.ml-agents/Runtime/Sensors/Reflection/EnumReflectionSensor.cs.meta


fileFormatVersion: 2
guid: 7d86e42cede474ec28dc3b1ef1c7a63c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存