|
|
|
|
|
|
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}. " |
|
|
|