Summary
While comparing the unified input schema in deepmd/utils/argcheck.py with the JAX backend implementation, I found several schema-exposed options that are not implemented or not wired up in deepmd/jax yet.
This issue tracks the gaps so we can either implement them for JAX or make the schema/docs explicitly say that these options are unavailable in the JAX backend.
Gaps
1. Non-energy fittings/models are registered, but JAX training only accepts loss.type: ener
Schema/backend registrations:
deepmd/utils/argcheck.py exposes fitting types including ener, dos, property, polar, and dipole.
- The JAX backend registers matching fitting/model classes for
dos, property, dipole, and polar under deepmd/jax/fitting/fitting.py and deepmd/jax/model/*.py.
Implementation:
deepmd/jax/train/trainer.py _build_losses() only accepts loss_type == "ener"; any other loss raises RuntimeError("unknown loss type ...").
Impact:
- JAX can construct non-energy model/fitting objects, but JAX training cannot train the corresponding DOS/property/tensor tasks because the loss dispatch rejects non-energy losses.
2. model.spin is accepted by the common schema, but JAX explicitly rejects spin models
Schema/docs:
deepmd/utils/argcheck.py exposes the top-level model.spin block.
Implementation:
deepmd/jax/model/model.py raises NotImplementedError("Spin model is not implemented yet.") when model.type == "standard" and spin is present.
Impact:
- Schema-valid spin model configs fail at JAX model construction time.
3. Learning-rate schema exposes exp, cosine, and wsd, but JAX only implements exp
Schema/docs:
deepmd/utils/argcheck.py registers learning_rate.type variants exp, cosine, and wsd.
Implementation:
deepmd/jax/train/trainer.py _get_lr_and_coef() dispatches only type == "exp" to LearningRateExp; all other types raise RuntimeError("unknown learning_rate type ...").
Impact:
learning_rate.type=cosine or learning_rate.type=wsd is schema-exposed but unavailable in JAX training.
4. The optimizer schema is not wired into JAX training
Schema/docs:
deepmd/utils/argcheck.py exposes an optimizer block and optimizer variants.
Implementation:
deepmd/jax/train/trainer.py builds an Optax chain directly with optax.scale_by_adam() and _scale_by_global_learning_rate(); it does not read config["optimizer"] or dispatch optimizer variants/parameters.
Impact:
- Optimizer options accepted by the common input schema have no effect in JAX training. At minimum this should be documented as unsupported; ideally JAX should consume the optimizer config it can support.
5. Several model-level schema variants are not present in the JAX backend registry
Schema/docs:
deepmd/utils/argcheck.py exposes model variants such as frozen, pairtab, and linear_ener in the common model schema.
Implementation observation:
- JAX model registrations are limited to the task models (
ener, dos, dipole, polar, property) plus zbl; I did not find JAX BaseModel.register(...) implementations for frozen, top-level pairtab, or linear_ener.
model.type: dpa4 / dpa4_ener are marked PyTorch-only in the schema, so those are not counted here as JAX implementation gaps.
Impact:
- Users can discover these model variants from the unified schema, but JAX cannot construct them unless there is a separate compatibility path.
Expected resolution
Either:
- implement/wire these options in the JAX backend, or
- update
argcheck.py/docs to mark them as unsupported for JAX so schema-valid configurations do not fail later in backend-specific code.
Filed by OpenClaw 2026.6.11 (e085fa1), model: custom-chat-jinzhezeng-group/gpt-5.5.
Implementation checklist
Model, loss, and optimizer support
Training support
Summary
While comparing the unified input schema in
deepmd/utils/argcheck.pywith the JAX backend implementation, I found several schema-exposed options that are not implemented or not wired up indeepmd/jaxyet.This issue tracks the gaps so we can either implement them for JAX or make the schema/docs explicitly say that these options are unavailable in the JAX backend.
Gaps
1. Non-energy fittings/models are registered, but JAX training only accepts
loss.type: enerSchema/backend registrations:
deepmd/utils/argcheck.pyexposes fitting types includingener,dos,property,polar, anddipole.dos,property,dipole, andpolarunderdeepmd/jax/fitting/fitting.pyanddeepmd/jax/model/*.py.Implementation:
deepmd/jax/train/trainer.py_build_losses()only acceptsloss_type == "ener"; any other loss raisesRuntimeError("unknown loss type ...").Impact:
2.
model.spinis accepted by the common schema, but JAX explicitly rejects spin modelsSchema/docs:
deepmd/utils/argcheck.pyexposes the top-levelmodel.spinblock.Implementation:
deepmd/jax/model/model.pyraisesNotImplementedError("Spin model is not implemented yet.")whenmodel.type == "standard"andspinis present.Impact:
3. Learning-rate schema exposes
exp,cosine, andwsd, but JAX only implementsexpSchema/docs:
deepmd/utils/argcheck.pyregisterslearning_rate.typevariantsexp,cosine, andwsd.Implementation:
deepmd/jax/train/trainer.py_get_lr_and_coef()dispatches onlytype == "exp"toLearningRateExp; all other types raiseRuntimeError("unknown learning_rate type ...").Impact:
learning_rate.type=cosineorlearning_rate.type=wsdis schema-exposed but unavailable in JAX training.4. The optimizer schema is not wired into JAX training
Schema/docs:
deepmd/utils/argcheck.pyexposes anoptimizerblock and optimizer variants.Implementation:
deepmd/jax/train/trainer.pybuilds an Optax chain directly withoptax.scale_by_adam()and_scale_by_global_learning_rate(); it does not readconfig["optimizer"]or dispatch optimizer variants/parameters.Impact:
5. Several model-level schema variants are not present in the JAX backend registry
Schema/docs:
deepmd/utils/argcheck.pyexposes model variants such asfrozen,pairtab, andlinear_enerin the common model schema.Implementation observation:
ener,dos,dipole,polar,property) pluszbl; I did not find JAXBaseModel.register(...)implementations forfrozen, top-levelpairtab, orlinear_ener.model.type: dpa4/dpa4_enerare marked PyTorch-only in the schema, so those are not counted here as JAX implementation gaps.Impact:
Expected resolution
Either:
argcheck.py/docs to mark them as unsupported for JAX so schema-valid configurations do not fail later in backend-specific code.Filed by OpenClaw 2026.6.11 (e085fa1), model: custom-chat-jinzhezeng-group/gpt-5.5.
Implementation checklist
Model, loss, and optimizer support
learning_rate.type: cosineandlearning_rate.type: wsd(fix(train): dispatch registered learning rate schedules #5776)HybridMuon)frozen,pairtab, andlinear_enermodel variantsTraining support
training.numb_epochand its aliasestraining.num_epoch_dicttraining.stat_filewhen computing or loading statisticstraining.profilingandtraining.enable_profilertraining.tensorboard*outputtraining.mixed_precisionto trainingtraining.change_bias_after_trainingafter the final step (fix(train): share post-training bias adjustment #5745)