Spaces:
Sleeping
Sleeping
Commit ·
82e7138
1
Parent(s): 14e5865
Decrease MAX_STEPS to 250 and change LLM frame skip to 10
Browse files- inference.py +2 -2
- openenv.yaml +4 -4
- src/env.py +1 -1
inference.py
CHANGED
|
@@ -346,9 +346,9 @@ def run_episode(task_id: int) -> float:
|
|
| 346 |
info = {}
|
| 347 |
|
| 348 |
while not done:
|
| 349 |
-
# Frame skipping: only invoke the LLM every
|
| 350 |
# Step skips use the heuristics to keep episode run-time blazing fast.
|
| 351 |
-
if step_count %
|
| 352 |
action = llm_agent(obs)
|
| 353 |
else:
|
| 354 |
action = heuristic_agent(obs)
|
|
|
|
| 346 |
info = {}
|
| 347 |
|
| 348 |
while not done:
|
| 349 |
+
# Frame skipping: only invoke the LLM every 10 steps to prevent 30-min evaluation timeouts.
|
| 350 |
# Step skips use the heuristics to keep episode run-time blazing fast.
|
| 351 |
+
if step_count % 10 == 0:
|
| 352 |
action = llm_agent(obs)
|
| 353 |
else:
|
| 354 |
action = heuristic_agent(obs)
|
openenv.yaml
CHANGED
|
@@ -46,20 +46,20 @@ tasks:
|
|
| 46 |
numeric_id: 0
|
| 47 |
grader: time_to_detection
|
| 48 |
max_score: 1.0
|
| 49 |
-
episode_length:
|
| 50 |
description: Detect sinusoidal FDI attack within 100 steps of attack start
|
| 51 |
- id: multi_attack_classification
|
| 52 |
difficulty: medium
|
| 53 |
numeric_id: 1
|
| 54 |
grader: classification_accuracy
|
| 55 |
max_score: 1.0
|
| 56 |
-
episode_length:
|
| 57 |
description: Classify attack type from observation window
|
| 58 |
- id: stealthy_attack_detection
|
| 59 |
difficulty: hard
|
| 60 |
numeric_id: 2
|
| 61 |
grader: pre_lock_loss_detection
|
| 62 |
max_score: 1.0
|
| 63 |
-
episode_length:
|
| 64 |
description: Detect stealthy low-amplitude attack before PLL loss-of-lock
|
| 65 |
-
episode_length:
|
|
|
|
| 46 |
numeric_id: 0
|
| 47 |
grader: time_to_detection
|
| 48 |
max_score: 1.0
|
| 49 |
+
episode_length: 250
|
| 50 |
description: Detect sinusoidal FDI attack within 100 steps of attack start
|
| 51 |
- id: multi_attack_classification
|
| 52 |
difficulty: medium
|
| 53 |
numeric_id: 1
|
| 54 |
grader: classification_accuracy
|
| 55 |
max_score: 1.0
|
| 56 |
+
episode_length: 250
|
| 57 |
description: Classify attack type from observation window
|
| 58 |
- id: stealthy_attack_detection
|
| 59 |
difficulty: hard
|
| 60 |
numeric_id: 2
|
| 61 |
grader: pre_lock_loss_detection
|
| 62 |
max_score: 1.0
|
| 63 |
+
episode_length: 250
|
| 64 |
description: Detect stealthy low-amplitude attack before PLL loss-of-lock
|
| 65 |
+
episode_length: 250
|
src/env.py
CHANGED
|
@@ -27,7 +27,7 @@ from src.detector import AdaptiveDetector
|
|
| 27 |
|
| 28 |
|
| 29 |
WINDOW_SIZE = 20
|
| 30 |
-
MAX_STEPS =
|
| 31 |
LOCK_LOSS_THRESHOLD = 0.0873 # 5 degrees in radians
|
| 32 |
|
| 33 |
DETECTION_THRESHOLD = 2.0
|
|
|
|
| 27 |
|
| 28 |
|
| 29 |
WINDOW_SIZE = 20
|
| 30 |
+
MAX_STEPS = 250
|
| 31 |
LOCK_LOSS_THRESHOLD = 0.0873 # 5 degrees in radians
|
| 32 |
|
| 33 |
DETECTION_THRESHOLD = 2.0
|