Repository navigation
Conversation
Signed-off-by: PerryLink <255665900+PerryLink@users.noreply.github.com>
This branch has not been 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.
What
ComposableConfig.from_dict()silently keeps only the first entry when the dict describes more thanone config:
The return value is not even a
ComposableConfig, so anything that then treats it as one(
config.compose(...), iteration) fails or ignores the other entries. The single-entry case works, whichis why this stayed hidden.
The change
Iterate all entries, build one sub-config per key, and return a
ComposableConfigthat holds them —+3/−4 lines in
neural_compressor/common/base_config.py. Single-entry behaviour is unchanged.Verification
test_composable_config_from_dict: fails on pristinemainwithFakeAlgoConfig ... is not an instance of ComposableConfig, passes after;FakeAConfig(weight_bits=2)before andComposableConfig([FakeAConfig(2), FakeBConfig(6)])after;test/commonsuite: 32 tests OK under both unittest and pytest;git apply --checkon a pristinemain; both files are100644.No framework-level end-to-end test is included: the bug is in the framework-agnostic common layer, and
torch/TF are not available offline here.
No CLA in the repository; commits are signed off, as the repo's DCO check requires.