Commit cca4eb9
Han Wang
refactor: defuse dpa2 register_buffer trap for tebd compression slot
deepmd/pt_expt/descriptor/dpa2.py:_store_type_embd_data still called
torch.nn.Module.register_buffer(self, "type_embd_data", ...) directly,
the same raw pattern fixed for dpa1/se_t_tebd in the previous commit.
DescrptDPA2 (dpmodel) doesn't declare the type_embd_data slot yet, so
this was purely defensive, but it removes the landmine for whichever
future change declares it there. Swap to the existing
register_buffer_replacing_slot() helper in pt_expt/common.py.1 parent 1072bb2 commit cca4eb9
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | | - | |
| 288 | + | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
| |||
0 commit comments