Skip to content

LES with ForceStressOutput(positional diff) init - #1

Closed
lee2tae wants to merge 5 commits into
mainfrom
claude/review-les-branch-EXD1S
Closed

lee2tae wants to merge 5 commits into
mainfrom
claude/review-les-branch-EXD1S

Conversation

@lee2tae

@lee2tae lee2tae commented May 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

lee2tae and others added 5 commits April 17, 2026 17:48
Replace raw e3nn.o3.Linear with SevenNet's IrrepsLinear wrapper so the
readout supports lazy instantiation, FlashTP/cueq backend conversion, and
modality-aware one-hot concatenation. zero_init is deferred to
instantiate() to remain compatible with lazy mode.

https://claude.ai/code/session_018xjQvBPU2gzbRKMut4EgPa
Weight tensor moved from first_linear.weight to first_linear.linear.weight
after refactoring LatentChargeReadout to wrap IrrepsLinear instead of raw
e3nn.o3.Linear.

https://claude.ai/code/session_018xjQvBPU2gzbRKMut4EgPa
Remove set_num_modalities, _is_batch_data property, and the saved_input
restore logic from forward(). Mirrors the LES branch's fix commit (e1af8d3):
modality dependence already flows through the upstream conv stack's
modality-aware features, so the q-readout does not need to concat the
one-hot itself.

https://claude.ai/code/session_018xjQvBPU2gzbRKMut4EgPa
test_les_legacy.py:
  - test_is_batch_data_propagates: verify set_is_batch_data reaches
    EdgePreprocess, LatentEwaldSum, and ForceStressOutput. Guards against
    regressions from removing the _is_batch_data property on
    LatentChargeReadout.
  - test_state_dict_round_trip: save/load round-trip reproduces output
    bit-for-bit on a freshly built model.
  - test_lr_energy_is_scalar: non-batch LR_ENERGY must be shape () so
    AddLREnergy does not silently broadcast onto scalar SR_ENERGY.
  - test_lr_changes_force / test_lr_changes_stress: with shared SR weights,
    non-zero charges must produce non-trivial force/stress contributions.
    Catches a silently broken LR gradient path.
  - test_strain_leaf_created_during_forward: also assert is_leaf so
    d(E)/d(_strain) is well-defined.

test_les_finetune.py:
  - test_is_batch_data_propagates: same regression guard on the omni model.
  - test_state_dict_round_trip: save/load through build_model_with_les.
  - test_lr_energy_zero_at_init: also assert shape == () in non-batch mode.

https://claude.ai/code/session_018xjQvBPU2gzbRKMut4EgPa
@lee2tae lee2tae closed this May 18, 2026
@lee2tae
lee2tae deleted the claude/review-les-branch-EXD1S branch June 12, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants