Fix CI test FP8 static backend matching failure#1589
Merged
Conversation
… None mismatch Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes FP8 static backend matching during model reload by making QuantizationScheme equality tolerant to None vs {} drift in dict-typed fields (notably transform_config), preventing false “no compatible backend” errors in FP8 static inference.
Changes:
- Updates
QuantizationScheme.__eq__to treatNoneand empty dict{}as equivalent for dict-valued fields. - Prevents FP8 static backend selection from failing when reloaded configs deserialize
transform_configas{}.
chensuyue
approved these changes
Mar 21, 2026
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.
Description
Problem
test_fp8_static and test_fp8_static_rtn fail during model loading with:
ValueError: No compatible backend found for layer model.decoder.layers.1.self_attn.v_proj
with config QuantizationScheme(..., transform_config={})
Root Cause
When a quantized FP8 static model is saved and reloaded, the transform_config field undergoes a None → {} drift:
Preset definition (FP8_STATIC): transform_config=None (dataclass default)
Export/save: BaseCompressor initializes transform_config to {}, which gets serialized into the quantization config JSON
Load/inference: JSON deserializes it back as {}, producing QuantizationScheme(..., transform_config={})
Backend matching: fp8_static_scheme_checker compares the loaded config against FP8_STATIC using ==, which fails because {} != None
Fix
Updated QuantizationScheme.eq to treat None and empty dict {} as semantically equivalent for dict-typed fields like transform_config. Both represent "no transform config", so they should compare as equal.
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting