Commit 8a2f9d2
fix: Remove hardcoded lmi config name in ModelBuilder optimize (#5749)
* fix: Remove hardcoded lmi config name in ModelBuilder optimize
Replace hardcoded config_name='lmi' in ModelBuilder.optimize() with
the model's dynamically resolved default config name. The JumpStart
metadata for models like llama-3-1-8b-instruct no longer includes an
'lmi' config, causing ValueError during optimization.
Also fix test_jumpstart_session_with_config_name to use the model's
resolved config_name instead of hardcoding 'tgi', and update unit
test assertions in test_js_builder.py accordingly.
* fix: Use flexible Environment assertions in serve deep unit tests
The JumpStart metadata update changed the default config from 'lmi' to
'max_context_best_price_performance', which adds extra environment
variables to container_defs. Updated all three test assertions to use
ANY for the Environment dict and separately verify only the specific
env vars each test cares about (OPTION_QUANTIZE, OPTION_TENSOR_PARALLEL_DEGREE,
OPTION_SPECULATIVE_DRAFT_MODEL).
* Fix codestyle
---------
Co-authored-by: Molly He <mollyhe@amazon.com>1 parent cebc27a commit 8a2f9d2
File tree
4 files changed
+29
-36
lines changed- src/sagemaker/serve/builder
- tests
- integ/sagemaker
- jumpstart/model
- serve
- unit/sagemaker/serve/builder
4 files changed
+29
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1734 | 1736 | | |
1735 | 1737 | | |
1736 | 1738 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
Lines changed: 21 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 65 | + | |
75 | 66 | | |
76 | 67 | | |
77 | 68 | | |
| |||
96 | 87 | | |
97 | 88 | | |
98 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
149 | 148 | | |
150 | 149 | | |
151 | 150 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 151 | + | |
162 | 152 | | |
163 | 153 | | |
164 | 154 | | |
| |||
172 | 162 | | |
173 | 163 | | |
174 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
175 | 170 | | |
176 | 171 | | |
177 | 172 | | |
| |||
237 | 232 | | |
238 | 233 | | |
239 | 234 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 235 | + | |
250 | 236 | | |
251 | 237 | | |
252 | 238 | | |
| |||
260 | 246 | | |
261 | 247 | | |
262 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
263 | 254 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1696 | 1696 | | |
1697 | 1697 | | |
1698 | 1698 | | |
1699 | | - | |
| 1699 | + | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| |||
1784 | 1784 | | |
1785 | 1785 | | |
1786 | 1786 | | |
1787 | | - | |
| 1787 | + | |
1788 | 1788 | | |
1789 | 1789 | | |
1790 | 1790 | | |
| |||
0 commit comments