REFACTOR external service and improve websocket training
This commit is contained in:
@@ -41,25 +41,16 @@ class TrainingSettings(BaseServiceSettings):
|
||||
REDIS_DB: int = 1
|
||||
|
||||
# ML Model Storage
|
||||
MODEL_STORAGE_PATH: str = os.getenv("MODEL_STORAGE_PATH", "/app/models")
|
||||
MODEL_BACKUP_ENABLED: bool = os.getenv("MODEL_BACKUP_ENABLED", "true").lower() == "true"
|
||||
MODEL_VERSIONING_ENABLED: bool = os.getenv("MODEL_VERSIONING_ENABLED", "true").lower() == "true"
|
||||
|
||||
# Training Configuration
|
||||
MAX_TRAINING_TIME_MINUTES: int = int(os.getenv("MAX_TRAINING_TIME_MINUTES", "30"))
|
||||
MAX_CONCURRENT_TRAINING_JOBS: int = int(os.getenv("MAX_CONCURRENT_TRAINING_JOBS", "3"))
|
||||
MIN_TRAINING_DATA_DAYS: int = int(os.getenv("MIN_TRAINING_DATA_DAYS", "30"))
|
||||
TRAINING_BATCH_SIZE: int = int(os.getenv("TRAINING_BATCH_SIZE", "1000"))
|
||||
|
||||
# Prophet Specific Configuration
|
||||
PROPHET_SEASONALITY_MODE: str = os.getenv("PROPHET_SEASONALITY_MODE", "additive")
|
||||
PROPHET_CHANGEPOINT_PRIOR_SCALE: float = float(os.getenv("PROPHET_CHANGEPOINT_PRIOR_SCALE", "0.05"))
|
||||
PROPHET_SEASONALITY_PRIOR_SCALE: float = float(os.getenv("PROPHET_SEASONALITY_PRIOR_SCALE", "10.0"))
|
||||
PROPHET_HOLIDAYS_PRIOR_SCALE: float = float(os.getenv("PROPHET_HOLIDAYS_PRIOR_SCALE", "10.0"))
|
||||
|
||||
# Spanish Holiday Integration
|
||||
ENABLE_SPANISH_HOLIDAYS: bool = True
|
||||
ENABLE_MADRID_HOLIDAYS: bool = True
|
||||
ENABLE_CUSTOM_HOLIDAYS: bool = os.getenv("ENABLE_CUSTOM_HOLIDAYS", "true").lower() == "true"
|
||||
|
||||
# Data Processing
|
||||
@@ -79,6 +70,8 @@ class TrainingSettings(BaseServiceSettings):
|
||||
PROPHET_DAILY_SEASONALITY: bool = True
|
||||
PROPHET_WEEKLY_SEASONALITY: bool = True
|
||||
PROPHET_YEARLY_SEASONALITY: bool = True
|
||||
PROPHET_SEASONALITY_MODE: str = "additive"
|
||||
|
||||
settings = TrainingSettings()
|
||||
# Throttling settings for parallel training to prevent heartbeat blocking
|
||||
MAX_CONCURRENT_TRAININGS: int = int(os.getenv("MAX_CONCURRENT_TRAININGS", "3"))
|
||||
|
||||
settings = TrainingSettings()
|
||||
|
||||
Reference in New Issue
Block a user