Commit 696d251
Address remaining PR review feedback
- Wrap reference forward pass in try/finally so LoRA adapters are always
re-enabled even if the forward throws (prevents silent training with
permanently disabled LoRA on subsequent calls)
- Replace assert with raise ValueError for eagle_offline compatibility check
so it cannot be silently optimized away with python -O; update test to
expect ValueError instead of AssertionError
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Ye Yu <yeyu@nvidia.com>1 parent 56f459f commit 696d251
2 files changed
Lines changed: 9 additions & 6 deletions
File tree
- modelopt/torch/speculative/plugins
- tests/unit/torch/speculative/plugins
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
| 651 | + | |
| 652 | + | |
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
| |||
818 | 819 | | |
819 | 820 | | |
820 | 821 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
825 | 828 | | |
826 | 829 | | |
827 | 830 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
0 commit comments