Update env/environment.py

#1
Files changed (1) hide show
  1. env/environment.py +2 -3
env/environment.py CHANGED
@@ -64,8 +64,6 @@ class SQLDebuggerEnvironment:
64
  raise ValueError(f"Failed to load task: {str(e)}")
65
 
66
  # ── Initialize DatabaseSimulator ──────────────────────────
67
- # Always clear milestone state on episode reset.
68
- self._milestones_earned = set()
69
  # Only initialize for Round 2 scenarios (have 'tables' key)
70
  if "tables" in task and "slow_queries" in task:
71
  self._db_sim = DatabaseSimulator(task)
@@ -74,6 +72,7 @@ class SQLDebuggerEnvironment:
74
  # Round 1 task β€” no DB simulator needed
75
  self._db_sim = None
76
  self._baseline_score = 0.0
 
77
 
78
  # ── Reset episode state ───────────────────────────────────
79
  self._current_task = task
@@ -362,4 +361,4 @@ class SQLDebuggerEnvironment:
362
  # SINGLETON INSTANCE (used by FastAPI)
363
  # ─────────────────────────────────────────────
364
 
365
- environment = SQLDebuggerEnvironment()
 
64
  raise ValueError(f"Failed to load task: {str(e)}")
65
 
66
  # ── Initialize DatabaseSimulator ──────────────────────────
 
 
67
  # Only initialize for Round 2 scenarios (have 'tables' key)
68
  if "tables" in task and "slow_queries" in task:
69
  self._db_sim = DatabaseSimulator(task)
 
72
  # Round 1 task β€” no DB simulator needed
73
  self._db_sim = None
74
  self._baseline_score = 0.0
75
+ self._milestones_earned = set()
76
 
77
  # ── Reset episode state ───────────────────────────────────
78
  self._current_task = task
 
361
  # SINGLETON INSTANCE (used by FastAPI)
362
  # ─────────────────────────────────────────────
363
 
364
+ environment = SQLDebuggerEnvironment()