Digital-Galatea / config.py
Your Name
Refactor: Remove smoke tests, fix Pi-3.1 API calls, update dependencies
abba072
raw
history blame contribute delete
876 Bytes
"""Configuration loading module"""
import os
import yaml
import logging
# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
def load_model_config(config_path="models.yaml"):
"""Load model configuration from YAML file"""
try:
if os.path.exists(config_path):
with open(config_path, 'r', encoding='utf-8') as f:
config = yaml.safe_load(f)
logging.info(f"βœ“ Model configuration loaded from {config_path}")
return config
else:
logging.warning(f"⚠ Model configuration file {config_path} not found, using defaults")
return None
except Exception as e:
logging.error(f"βœ— Error loading model configuration: {e}")
return None
# Load configuration at module level
MODEL_CONFIG = load_model_config()