Commit e39e44f
refactor(evaluator): narrow the agent-eval run seam without an assert
The assert target is not None in AgentEvaluator.run was dead at runtime --
the both/neither cases were already rejected above -- and existed only so the type
checker could narrow target. Reject the "both" case up front and let the
branch chain itself narrow each arm, with the final arm covering "neither".
Adds the missing regression test for the neither-supplied case.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Sandy Chapman <schapman@nvidia.com>1 parent ce2e986 commit e39e44f
3 files changed
Lines changed: 21 additions & 12 deletions
File tree
- packages/nemo_evaluator_sdk
- src/nemo_evaluator_sdk/agent_eval
- tests/agent_eval
- sdk/python/nemo-platform/src/nemo_platform/beta/evaluator/agent_eval
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
174 | | - | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
299 | 304 | | |
300 | 305 | | |
301 | 306 | | |
| |||
Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments