Repository navigation
Commit 9865719
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 f3d623d commit 9865719
2 files changed
Lines changed: 13 additions & 12 deletions
File tree
- sagemaker-train
- src/sagemaker/train/common_utils
- tests/unit/train/common_utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
| 572 | + | |
576 | 573 | | |
577 | 574 | | |
578 | 575 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
584 | 581 | | |
585 | | - | |
| 582 | + | |
586 | 583 | | |
587 | | - | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
| 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