Tarang_v2 / config.py
unknownfriend00007's picture
Update config.py
d1db89f verified
raw
history blame contribute delete
860 Bytes
import os
from dataclasses import dataclass
@dataclass
class Config:
DATA_DIR: str = "historical_data"
ARTIFACT_DIR: str = "artifacts"
INTERVAL: str = "1d"
HORIZON_DAYS: int = 1
WINDOW: int = 40
SEED: int = 42
INITIAL_TRAIN_EPOCHS: int = 8
UPDATE_TRAIN_EPOCHS: int = 1
BATCH_SIZE: int = 128
LR: float = 2e-4
WEIGHT_DECAY: float = 1e-4
VAL_SPLIT: float = 0.1
MAX_ASSETS: int = 9999
# Live ingestion cadence
INGEST_EVERY_SECONDS: int = 60 * 30
# Neon checkpoint cadence (exactly 1 write per hour in app.py loop)
CHECKPOINT_EVERY_SECONDS: int = 60 * 60
# Neon
NEON_CONNECTION: str = os.getenv("NEON_CONNECTION_STRING") or os.getenv("DATABASE_URL") or ""
HOST: str = "0.0.0.0"
PORT: int = int(os.getenv("PORT", "7860"))
RETRAIN_ON_START: bool = True
config = Config()