Repository navigation
Conversation
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1741
Problem
MACELESbuilds seven LES readout containers besidesles_readouts:les_u_readouts(dipoles)les_quad_1o_readouts,les_quad_2e_readouts(quadrupoles)les_alpha_readouts,les_alpha_1o_readouts,les_alpha_2e_readouts(polarizability)les_kappa_readouts(hardness)None of them is listed in
optional_submodule_namesinget_params_options. Since #1529 added the unregistered-parameter guard, training anyMACELESwithuse_dipole,use_quad, induced charges or dipoles, or anisotropic polarizability fails at optimizer setup:Before #1529 the same weights were silently left out of the optimizer. They received gradients but kept their initial values for the whole run.
Changes
mace/tools/scripts_utils.py: add the seven container names tooptional_submodule_names. They useweight_decay=0.0, the same asles_readouts.tests/extensions/les/test_maceles.py: add a test that builds a multipolarMACELESwith 0e/1o/2e channels and asserts that every LES readout container is non-empty and gets its own optimizer group. Unclaimed parameters are already caught by the guard inget_params_options.Compatibility
Monopole-only
MACELESand all other model classes get exactly the same parameter groups as before. Empty containers are skipped by the existingif not submodule_parameterscheck, so no empty groups are added.Testing
developwith theValueErrorabove and passes with this change.pytest tests/extensions/les tests/unit/test_optimizer_param_groups.pypasses.