Commit d1659a8
committed
fix(app): custom problem preview was calling Relaxation as a callable
The Custom-problem Preview panel raised "'SpinRelaxation' object is not callable" because it did `problem.loss_fn(problem.relaxation(x))` — but `relaxation` is a Relaxation *instance*. Build the latent of the right shape, push it through `relax.forward`, then call `loss_fn` directly. Also report both the relaxed and the discrete sample value, type-check the return, and add an AppTest assertion that the Preview panel renders no st.error.1 parent 5323c57 commit d1659a8
2 files changed
Lines changed: 42 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
978 | 978 | | |
979 | 979 | | |
980 | 980 | | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
981 | 988 | | |
982 | | - | |
983 | | - | |
984 | | - | |
| 989 | + | |
985 | 990 | | |
986 | | - | |
987 | | - | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
988 | 1007 | | |
989 | | - | |
990 | | - | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
991 | 1011 | | |
992 | 1012 | | |
993 | 1013 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
62 | 77 | | |
63 | 78 | | |
64 | 79 | | |
| |||
0 commit comments