Commit 43cf130
Skip outcomes with no observations in TorchAdapter dataset construction (#5077)
Summary:
Pull Request resolved: #5077
When tracking metrics have data in only a subset of trials,
`_convert_experiment_data` can produce empty `SupervisedDataset`s (0 rows)
after NaN filtering. This causes `Standardize` in BoTorch to crash with
`ValueError: Can't standardize with no observations`.
This is not generation-blocking when the empty metric is only a tracking
metric (not in the optimization config). The fix skips such outcomes with
a warning instead of producing empty datasets that crash model fitting.
Also fixes a latent `IndexError: list index out of range` in the
`candidate_metadata` reordering logic: when outcomes are skipped, the
metadata list was shorter than the outcomes list, causing misaligned
indexing. Changed `candidate_metadata` from a positional list to a dict
keyed by outcome name.
Meta: this unblocks Ax experiment `ifu_rbvm_session_proxy_pts`
Reviewed By: Balandat
Differential Revision: D97369642
fbshipit-source-id: 105942828b7bde6fc105eefc73ef82032ab94f591 parent 446ddb8 commit 43cf130
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
545 | 549 | | |
546 | 550 | | |
547 | 551 | | |
| |||
551 | 555 | | |
552 | 556 | | |
553 | 557 | | |
554 | | - | |
| 558 | + | |
555 | 559 | | |
556 | 560 | | |
557 | 561 | | |
| |||
561 | 565 | | |
562 | 566 | | |
563 | 567 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
572 | | - | |
| 575 | + | |
573 | 576 | | |
574 | 577 | | |
575 | 578 | | |
| |||
0 commit comments