浏览代码

validate_environment_path

/asymm-envs
Alphonso Crawford 4 年前
当前提交
40f1f6ed
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 4
      ml-agents-envs/mlagents_envs/environment.py
  2. 2
      ml-agents/mlagents/trainers/learn.py

4
ml-agents-envs/mlagents_envs/environment.py


return RpcCommunicator(worker_id, base_port, timeout_wait)
@staticmethod
def environment_launch_check(env_path: str) -> Optional[str]:
def validate_environment_path(env_path: str) -> Optional[str]:
if not (glob.glob(env_path) or glob.glob(env_path + ".*")):
raise UnityEnvironmentException(
"Couldn't launch the {0} environment. "

)
true_filename = os.path.basename(os.path.normpath(file_name))
logger.debug("The true file name is {}".format(true_filename))
launch_string = self.environment_launch_check(file_name)
launch_string = self.validate_environment_path(file_name)
if launch_string is None:
self._close()
raise UnityEnvironmentException(

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


.replace(".x86_64", "")
.replace(".x86", "")
)
launch_string = UnityEnvironment.environment_launch_check(env_path)
launch_string = UnityEnvironment.validate_environment_path(env_path)
if launch_string is None:
raise UnityEnvironmentException(
"Couldn't launch the {0} environment. "

正在加载...
取消
保存