Spaces:
Sleeping
Sleeping
echoboi Claude Sonnet 4.6 commited on
Commit ·
3dbfa3d
1
Parent(s): 5931b5f
Fix G06 500 error: call env.reset() on session creation to init hidden state
Browse filesG06 (DirectionalFlow) requires orientation to be set before get_true_next()
can be called. Session creation never called reset(), leaving _orientation=None
and causing RuntimeError -> 500 on submit_rule.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -183,6 +183,7 @@ def create_session(body: SessionCreate, _: None = Depends(_auth)):
|
|
| 183 |
except KeyError as exc:
|
| 184 |
raise HTTPException(400, str(exc))
|
| 185 |
|
|
|
|
| 186 |
sid = str(uuid.uuid4())
|
| 187 |
with _lock:
|
| 188 |
_sessions[sid] = {
|
|
|
|
| 183 |
except KeyError as exc:
|
| 184 |
raise HTTPException(400, str(exc))
|
| 185 |
|
| 186 |
+
env.reset(seed=42) # initialises hidden state (e.g. G06 orientation) before any scoring
|
| 187 |
sid = str(uuid.uuid4())
|
| 188 |
with _lock:
|
| 189 |
_sessions[sid] = {
|