浏览代码

properly formatting within environment_launch_check

/asymm-envs
Alphonso Crawford 5 年前
当前提交
b891a38b
共有 1 个文件被更改,包括 4 次插入10 次删除
  1. 14
      ml-agents/mlagents/trainers/learn.py

14
ml-agents/mlagents/trainers/learn.py


if not (glob.glob(env_path) or glob.glob(env_path + ".*")):
raise UnityEnvironmentException(
"Couldn't launch the {0} environment. "
"Provided filename does not match any environments.".format(
env_path
)
"Provided filename does not match any environments.".format(env_path)
)
cwd = os.getcwd()
launch_string = None

if len(candidates) == 0:
candidates = glob.glob(os.path.join(cwd, env_path) + ".x86")
if len(candidates) == 0:
candidates = glob.glob(env_path+ ".x86_64")
candidates = glob.glob(env_path + ".x86_64")
if len(candidates) == 0:
candidates = glob.glob(env_path + ".x86")
if len(candidates) > 0:

candidates = glob.glob(
os.path.join(
cwd, env_path + ".app", "Contents", "MacOS", true_filename
)
os.path.join(cwd, env_path + ".app", "Contents", "MacOS", true_filename)
)
if len(candidates) == 0:
candidates = glob.glob(

if launch_string is None:
raise UnityEnvironmentException(
"Couldn't launch the {0} environment. "
"Provided filename does not match any environments.".format(
true_filename
)
"Provided filename does not match any environments.".format(true_filename)
)

正在加载...
取消
保存