浏览代码

Raise exception if path does not exist

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

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


import argparse
import os
from os import path
import glob
import shutil
import numpy as np

from mlagents.trainers.subprocess_env_manager import SubprocessEnvManager
from mlagents_envs.side_channel.side_channel import SideChannel
from mlagents_envs.side_channel.engine_configuration_channel import EngineConfig
from mlagents_envs.exception import UnityEnvironmentException
def _create_parser():

env_args: Optional[List[str]],
) -> Callable[[int, List[SideChannel]], BaseEnv]:
if env_path is not None:
if not path.exists(env_path):
raise UnityEnvironmentException(
"Couldn't launch the {0} environment. "
"Provided filename does not match any environments.".format(
env_path
)
)
# Strip out executable extensions if passed
env_path = (
env_path.strip()

正在加载...
取消
保存