You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Han Wang
committed
fix(pt_expt): keep use_amp out of serialization, fix the assembly boundary
use_amp is a runtime/training policy, not model state: revert the
dpa4/sezm serialize additions (a use_amp record leaks a torch runtime
option into cross-backend records -- the jax deserializer rejects
use_amp=true -- and deepmodeling#5963 established that checkpoints must not carry
the AMP switch).
The real pt_expt bug is in model assembly: make_model handed the raw
dpmodel atomic class to the dpmodel CM, so the constructed atomic model
was converted through the auto-wrap serialize()/deserialize() round-trip
and every runtime-only option on the live descriptor was reset to its
constructor default. Hand the CM the auto-wrapped atomic class instead:
the atomic model is constructed directly as a torch module and the live
(already wrapped) descriptor/fitting are kept as-is -- no round-trip.
Regression tests exercise the public construction path (get_model with
descriptor.use_amp=false) and pin that the portable record does not
carry use_amp.
0 commit comments