Skip to content

remove regress_stress/forces and direct_forces properties#1928

Open
lbluque wants to merge 4 commits intomainfrom
remove-regress-properties
Open

remove regress_stress/forces and direct_forces properties#1928
lbluque wants to merge 4 commits intomainfrom
remove-regress-properties

Conversation

@lbluque
Copy link
Copy Markdown
Contributor

@lbluque lbluque commented Mar 26, 2026

Summary

  • Removed redundant property wrappers (direct_forces, regress_forces, regress_stress) from HydraInterfaceMixin, eSCNMDBackbone, MLP_EFS_Head, DatasetSpecificMoEWrapper, and DatasetSpecificSingleHeadWrapper that simply delegated to regress_config
  • Updated all call sites to access regress_config directly (e.g., self.regress_config.direct_forces instead of self.direct_forces)
  • In HydraInterfaceMixin.skip_property, replaced self.direct_forces with a safe getattr lookup on backbone.regress_config to avoid assuming all backbones have this attribute
  • Removed the direct_forces property from MLIPPredictUnit and inlined the access through self.model.module.backbone.regress_config.direct_forces
  • Removed the now-irrelevant test_direct_forces_property test

@meta-cla meta-cla bot added the cla signed label Mar 26, 2026
@lbluque lbluque added no-op deprecation Code deprecation refactor and removed cla signed labels Mar 26, 2026
@lbluque lbluque requested review from rayg1234 and wood-b March 26, 2026 19:06
@meta-cla meta-cla bot added the cla signed label Mar 26, 2026
Copy link
Copy Markdown
Contributor

@wood-b wood-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but its a but hard to track what flags get set in the model config? and has this been tested across all scenarios we care about e.g. conservative forces, direct forces, direct stress, etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants