Spaces:
Sleeping
Sleeping
Aadithya commited on
Commit ·
0776aa6
1
Parent(s): bd38f98
fix: make forecast window text dynamic based on actual horizon selected
Browse files- agents/nodes.py +4 -2
- scripts/train_chronos_mac.py +4 -3
agents/nodes.py
CHANGED
|
@@ -452,7 +452,8 @@ def strategy_formulator_node(state: GridOpsState) -> dict:
|
|
| 452 |
# Get the LLM summary
|
| 453 |
summary_rationale = mandate.get('summary_rationale', '')
|
| 454 |
|
| 455 |
-
|
|
|
|
| 456 |
|
| 457 |
mandate_narrative = (
|
| 458 |
f"{static_intro}\n\n"
|
|
@@ -552,7 +553,8 @@ def conservative_advisory_node(state: GridOpsState) -> dict:
|
|
| 552 |
|
| 553 |
summary_rationale = mandate.get('summary_rationale', '')
|
| 554 |
|
| 555 |
-
|
|
|
|
| 556 |
|
| 557 |
mandate_narrative = (
|
| 558 |
f"{static_intro}\n\n"
|
|
|
|
| 452 |
# Get the LLM summary
|
| 453 |
summary_rationale = mandate.get('summary_rationale', '')
|
| 454 |
|
| 455 |
+
horizon = state.get('forecast_horizon', 14)
|
| 456 |
+
static_intro = f"The GridOps AI pipeline has analyzed the current {horizon}-day forecast window. Below is the operational assessment of the predictive models."
|
| 457 |
|
| 458 |
mandate_narrative = (
|
| 459 |
f"{static_intro}\n\n"
|
|
|
|
| 553 |
|
| 554 |
summary_rationale = mandate.get('summary_rationale', '')
|
| 555 |
|
| 556 |
+
horizon = state.get('forecast_horizon', 14)
|
| 557 |
+
static_intro = f"The GridOps AI pipeline has analyzed the current {horizon}-day forecast window. Below is the operational assessment of the predictive models."
|
| 558 |
|
| 559 |
mandate_narrative = (
|
| 560 |
f"{static_intro}\n\n"
|
scripts/train_chronos_mac.py
CHANGED
|
@@ -57,13 +57,14 @@ def main():
|
|
| 57 |
"batch_size": 2, # Inference batch size
|
| 58 |
"fine_tune_batch_size": 1, # ABSOLUTE MINIMUM batch to fit 200M model in 8GB RAM
|
| 59 |
# --- Anti-Overfitting Training settings ---
|
| 60 |
-
"fine_tune_steps":
|
| 61 |
-
"fine_tune_lr":
|
| 62 |
# Force non-fused optimizer (fused AdamW requires CUDA, not MPS)
|
| 63 |
"fine_tune_trainer_kwargs": {
|
| 64 |
"optim": "adamw_torch",
|
|
|
|
| 65 |
"disable_tqdm": False, # Show progress bar
|
| 66 |
-
"logging_steps":
|
| 67 |
},
|
| 68 |
}
|
| 69 |
},
|
|
|
|
| 57 |
"batch_size": 2, # Inference batch size
|
| 58 |
"fine_tune_batch_size": 1, # ABSOLUTE MINIMUM batch to fit 200M model in 8GB RAM
|
| 59 |
# --- Anti-Overfitting Training settings ---
|
| 60 |
+
"fine_tune_steps": 5000, # Train for 5000 steps to properly learn the PJM patterns
|
| 61 |
+
"fine_tune_lr": 1e-5, # Smaller learning rate for a longer training run
|
| 62 |
# Force non-fused optimizer (fused AdamW requires CUDA, not MPS)
|
| 63 |
"fine_tune_trainer_kwargs": {
|
| 64 |
"optim": "adamw_torch",
|
| 65 |
+
"gradient_accumulation_steps": 8, # Simulates a batch size of 8 while only using RAM for 1
|
| 66 |
"disable_tqdm": False, # Show progress bar
|
| 67 |
+
"logging_steps": 50, # Print loss every 50 steps
|
| 68 |
},
|
| 69 |
}
|
| 70 |
},
|