浏览代码

[Release 7] Improve environment finding logic on windows (#4485)

* look in subdirectory for win builds

* exclude crashhandlers
/release_7_branch
GitHub 4 年前
当前提交
992f06a6
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10
      ml-agents-envs/mlagents_envs/env_utils.py

10
ml-agents-envs/mlagents_envs/env_utils.py


candidates = glob.glob(os.path.join(cwd, env_path + ".exe"))
if len(candidates) == 0:
candidates = glob.glob(env_path + ".exe")
if len(candidates) == 0:
# Look for e.g. 3DBall\UnityEnvironment.exe
crash_handlers = set(
glob.glob(os.path.join(cwd, env_path, "UnityCrashHandler*.exe"))
)
candidates = [
c
for c in glob.glob(os.path.join(cwd, env_path, "*.exe"))
if c not in crash_handlers
]
if len(candidates) > 0:
launch_string = candidates[0]
return launch_string

正在加载...
取消
保存