Commit 6335c7c
authored
fix: count_input_cfg_levels now resolves string file references (#15646)
* fix: count_input_cfg_levels now resolves string file references
When input_cfg is overridden via CLI to a YAML file path (e.g.
model.train_ds.input_cfg=train_all.yaml), the level counter only saw
the top-level string and reported 1 level, causing reweight_temperature
to broadcast incorrectly. Now it loads referenced YAML files to discover
nested input_cfg keys, matching the runtime behavior of
parse_and_combine_datasets.
Signed-off-by: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com>
* address Copilot review: memoize YAML loads, add debug logging, fix test name
- Cache resolved YAML files in _resolve_if_path to avoid redundant
disk/network I/O for sibling groups referencing the same file
- Add logging.debug when a path cannot be resolved, so failures
are never fully silent
- Rename misleading test to match its assertion (total depth is 2,
not 1; the unresolvable string is treated as a leaf)
Signed-off-by: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com>
---------
Signed-off-by: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com>1 parent 24590f2 commit 6335c7c
3 files changed
Lines changed: 87 additions & 2 deletions
File tree
- docs/source/audio
- nemo/collections/common/data/lhotse
- tests/collections/common
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
224 | 246 | | |
225 | 247 | | |
226 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
479 | 486 | | |
480 | 487 | | |
481 | 488 | | |
| |||
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
496 | 525 | | |
497 | 526 | | |
498 | 527 | | |
499 | 528 | | |
500 | 529 | | |
501 | | - | |
502 | | - | |
| 530 | + | |
| 531 | + | |
503 | 532 | | |
504 | 533 | | |
505 | 534 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
403 | 437 | | |
404 | 438 | | |
405 | 439 | | |
| |||
0 commit comments