in yourbench/utils/loading_engine.py [0:0]
def load(self) -> dict[str, Any]:
load_dotenv()
if not self.path.is_file():
logger.error(f"Configuration file not found: {self.path}")
raise FileNotFoundError(self.path)
try:
text = self.path.read_text(encoding="utf-8")
logger.debug(f"Read configuration from {self.path}")
expanded = os.path.expandvars(text)
config = yaml.safe_load(expanded) or {}
result = _expand_env_vars(config)
logger.debug(f"Configuration loaded successfully from {self.path}")
return result
except yaml.YAMLError as exc:
logger.error(f"Error parsing YAML {self.path}: {exc}")
raise
except Exception as exc: # noqa: BLE001
logger.error(f"Failed to load configuration {self.path}: {exc}")
raise