Commit c0da746
committed
fix: reject bare integer inputs in _parse_context_length
Bare integers like "128" were silently parsed as token counts (128),
causing every recipe to pass the >= filter and silently selecting the
shortest recipe instead of failing. Now raises ValueError with an
actionable message for any input not ending in 'K'.1 parent 4f70c8b commit c0da746
2 files changed
Lines changed: 13 additions & 12 deletions
File tree
- sagemaker-train
- src/sagemaker/train/common_utils
- tests/unit/train/common_utils
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
| 511 | + | |
515 | 512 | | |
516 | 513 | | |
517 | 514 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
523 | 520 | | |
524 | | - | |
| 521 | + | |
525 | 522 | | |
526 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
527 | 527 | | |
528 | 528 | | |
529 | 529 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1054 | 1054 | | |
1055 | 1055 | | |
1056 | 1056 | | |
1057 | | - | |
| 1057 | + | |
| 1058 | + | |
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
| |||
0 commit comments