Commit 0bdbc28
Simplify task value remapping API (meta-pytorch#3163)
Summary:
X-link: facebook/Ax#4860
Simplifies the get_task_value_remapping() API from 4 parameters to 2, addressing confusion reported in meta-pytorch#3085.
The observed_task_values parameter is removed because the parent diff (D90769576) now makes MultiTaskGP track observed/unobserved tasks internally via _observed_task_indices and _unobserved_task_indices. The default_task_value parameter is removed because the previous behavior—silently mapping unknown tasks to an arbitrary fallback—was confusing and error-prone; instead, unrecognized tasks now map to NaN, providing an explicit error sentinel with a clear warning message.
Differential Revision: D909982431 parent 0f55d50 commit 0bdbc28
5 files changed
Lines changed: 256 additions & 111 deletions
File tree
- botorch/models
- transforms
- utils
- test/models
- transforms
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | 318 | | |
322 | 319 | | |
323 | 320 | | |
324 | 321 | | |
325 | | - | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
511 | 512 | | |
512 | 513 | | |
513 | 514 | | |
514 | | - | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
519 | | - | |
520 | 519 | | |
521 | 520 | | |
522 | 521 | | |
| |||
526 | 525 | | |
527 | 526 | | |
528 | 527 | | |
529 | | - | |
530 | | - | |
531 | 528 | | |
532 | 529 | | |
533 | 530 | | |
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
537 | | - | |
538 | | - | |
539 | 534 | | |
540 | 535 | | |
541 | 536 | | |
542 | | - | |
| 537 | + | |
543 | 538 | | |
544 | | - | |
545 | | - | |
| 539 | + | |
546 | 540 | | |
547 | | - | |
548 | 541 | | |
549 | 542 | | |
550 | | - | |
| 543 | + | |
551 | 544 | | |
552 | 545 | | |
553 | 546 | | |
| |||
629 | 622 | | |
630 | 623 | | |
631 | 624 | | |
632 | | - | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
633 | 639 | | |
634 | 640 | | |
635 | 641 | | |
| |||
643 | 649 | | |
644 | 650 | | |
645 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
646 | 659 | | |
647 | 660 | | |
648 | 661 | | |
649 | 662 | | |
650 | 663 | | |
651 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
652 | 668 | | |
653 | 669 | | |
654 | 670 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
416 | 415 | | |
417 | 416 | | |
418 | | - | |
419 | 417 | | |
420 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
421 | 423 | | |
422 | 424 | | |
423 | | - | |
424 | | - | |
| 425 | + | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | | - | |
428 | 429 | | |
429 | 430 | | |
430 | | - | |
| 431 | + | |
431 | 432 | | |
432 | 433 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
441 | | - | |
| 442 | + | |
442 | 443 | | |
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
| 448 | + | |
457 | 449 | | |
458 | 450 | | |
459 | 451 | | |
460 | 452 | | |
461 | 453 | | |
462 | 454 | | |
463 | | - | |
| 455 | + | |
464 | 456 | | |
465 | 457 | | |
466 | 458 | | |
467 | | - | |
| 459 | + | |
468 | 460 | | |
469 | 461 | | |
470 | 462 | | |
| |||
0 commit comments