浏览代码

use absolute path in error (#3230)

/asymm-envs
GitHub 5 年前
当前提交
0fe7e731
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 4
      ml-agents/mlagents/trainers/trainer_util.py

4
ml-agents/mlagents/trainers/trainer_util.py


import os
import yaml
from typing import Any, Dict, TextIO
import logging

with open(config_path) as data_file:
return _load_config(data_file)
except IOError:
raise TrainerConfigError(f"Config file could not be found at {config_path}.")
abs_path = os.path.abspath(config_path)
raise TrainerConfigError(f"Config file could not be found at {abs_path}.")
except UnicodeDecodeError:
raise TrainerConfigError(
f"There was an error decoding Config file from {config_path}. "

正在加载...
取消
保存