Commit 89d04bd
fix(model): register magnetic cell derivatives correctly (#5836)
## Summary
- register magnetic cell derivatives in the cell-derivative bucket
instead of the coordinate bucket
- generate the corresponding reduced magnetic virial definition
- add the optional DeepEval backend name mapping so spin evaluation
request construction remains valid
- extend output-definition tests for bucket membership, shape, category,
reduction, and atomic metadata
## Why existing tests missed this
The existing comprehensive output-definition test only compared the
flattened ModelOutputDef key set. The magnetic cell derivative appeared
in that flattened set even while stored in the wrong internal bucket, so
the test passed. It did not inspect keys_derv_c versus keys_derv_r and
did not expect the reduced magnetic virial definition. The new
regression asserts both internal bucket membership and the derived
reduced definition.
## Validation
- ruff format .
- ruff check .
- complete output-definition test file plus TensorFlow C++ core
regression: 17 passed
- verified the new reduced output has a DeepEval backend mapping;
unsupported backend values keep the existing optional-output NaN/removal
behavior
An additional pt_expt spin-test collection attempt hit an environment
Triton plugin import segmentation fault before test collection; the
focused pure-metadata and core tests are unaffected.
Closes #5632
Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Corrected magnetic cell-derivative outputs so they are registered and
reduced through the appropriate cell-based pathway.
* Added support for magnetic cell-derivative output mapping to backend
virial results.
* Ensured magnetic derivative outputs have the correct reduced shape and
classification.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: njzjz-bot <njzjz.bot@gmail.com>1 parent 21df9d6 commit 89d04bd
3 files changed
Lines changed: 55 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
35 | 66 | | |
36 | 67 | | |
37 | 68 | | |
| |||
161 | 192 | | |
162 | 193 | | |
163 | 194 | | |
| 195 | + | |
164 | 196 | | |
165 | 197 | | |
166 | 198 | | |
| |||
218 | 250 | | |
219 | 251 | | |
220 | 252 | | |
| 253 | + | |
221 | 254 | | |
222 | 255 | | |
223 | 256 | | |
| |||
240 | 273 | | |
241 | 274 | | |
242 | 275 | | |
| 276 | + | |
243 | 277 | | |
244 | 278 | | |
245 | 279 | | |
| |||
277 | 311 | | |
278 | 312 | | |
279 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
280 | 318 | | |
281 | 319 | | |
282 | 320 | | |
| |||
393 | 431 | | |
394 | 432 | | |
395 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
396 | 443 | | |
397 | 444 | | |
398 | 445 | | |
| |||
456 | 503 | | |
457 | 504 | | |
458 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
459 | 510 | | |
460 | 511 | | |
461 | 512 | | |
| |||
481 | 532 | | |
482 | 533 | | |
483 | 534 | | |
| 535 | + | |
| 536 | + | |
484 | 537 | | |
485 | 538 | | |
486 | 539 | | |
| |||
0 commit comments