Commit 2014751
committed
fix(launcher): use the schema's draft_model global var, and validate the schema
`pipeline.global_vars` is a fixed-field dataclass (`GlobalVariables` in
tools/launcher/core.py), not a free-form mapping, so an unknown key fails at launch with
"No parameter named 'X' exists".
The Nemotron-3.5 DSpark warm-start example (#2149) invented `drafter:`, so the example in
the repo could not run at all:
Error processing argument 'pipeline.global_vars.drafter=...':
Invalid argument: No parameter named 'drafter' exists for <function launch>
`draft_model` is the field that already exists for exactly this purpose. Renaming the key
and its one reference fixes the example. The Kimi-K2.5 specdec_bench example had the same
latent break with `draft_model_dir:`; only the global-var key is renamed there, the
script's `--draft_model_dir` flag is unchanged.
This is the second time the class has shipped -- the comment on `GlobalVariables.draft_model`
records the first (OMNIML-5024) -- so check_launcher_yaml now rejects unknown global_vars
keys and references to keys that are never defined. It reads the field names out of core.py
with a regex rather than importing it, since importing pulls in nemo_run, which the
pre-commit environment does not have. Verified both ways: the check passes on every
launcher YAML in the tree, and reintroducing `drafter:` reproduces the error as a
pre-commit failure naming the valid keys.
Signed-off-by: h-guo18 <67671475+h-guo18@users.noreply.github.com>1 parent 2b296b2 commit 2014751
3 files changed
Lines changed: 53 additions & 5 deletions
File tree
- tools
- launcher/examples
- moonshotai/Kimi-K2.5
- nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
- precommit
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
115 | 161 | | |
116 | 162 | | |
117 | 163 | | |
| |||
124 | 170 | | |
125 | 171 | | |
126 | 172 | | |
| 173 | + | |
| 174 | + | |
127 | 175 | | |
128 | 176 | | |
129 | 177 | | |
| |||
0 commit comments