Spaces:
Paused
Paused
Commit ·
aeedd8d
1
Parent(s): 0587f05
fix: restore parse_model_output exception parity with original bare except
Browse files- Outer/inner handlers use except Exception (same outcomes as prior bare except for app errors)
- Remove unused ValidationError import from cell 3
Made-with: Cursor
training/train_grpo.ipynb
CHANGED
|
@@ -615,7 +615,8 @@
|
|
| 615 |
" for a in data.get(\"scheduled_actions\", []):\n",
|
| 616 |
" try:\n",
|
| 617 |
" scheduled.append(ScheduledAction(**a))\n",
|
| 618 |
-
" except
|
|
|
|
| 619 |
" pass\n",
|
| 620 |
" return ViraltestAction(\n",
|
| 621 |
" tool_calls=tool_calls,\n",
|
|
@@ -623,7 +624,8 @@
|
|
| 623 |
" replies=data.get(\"replies\", []),\n",
|
| 624 |
" notes=data.get(\"notes\"),\n",
|
| 625 |
" )\n",
|
| 626 |
-
" except
|
|
|
|
| 627 |
" return ViraltestAction(scheduled_actions=[])\n",
|
| 628 |
"\n",
|
| 629 |
"\n",
|
|
|
|
| 615 |
" for a in data.get(\"scheduled_actions\", []):\n",
|
| 616 |
" try:\n",
|
| 617 |
" scheduled.append(ScheduledAction(**a))\n",
|
| 618 |
+
" except Exception:\n",
|
| 619 |
+
" # Same as original bare `except:`: skip invalid scheduled_actions entries\n",
|
| 620 |
" pass\n",
|
| 621 |
" return ViraltestAction(\n",
|
| 622 |
" tool_calls=tool_calls,\n",
|
|
|
|
| 624 |
" replies=data.get(\"replies\", []),\n",
|
| 625 |
" notes=data.get(\"notes\"),\n",
|
| 626 |
" )\n",
|
| 627 |
+
" except Exception:\n",
|
| 628 |
+
" # Same behavior as original bare `except:`: any parse/validation failure -> empty action\n",
|
| 629 |
" return ViraltestAction(scheduled_actions=[])\n",
|
| 630 |
"\n",
|
| 631 |
"\n",
|