Fix OpenVINO conversion with older optimum-intel - #2650
Open
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Open
Fix OpenVINO conversion with older optimum-intel#2650Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Sylvester Kaczmarek (sylvesterkaczmarek)
September 3, 2026 19:45
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped to optionalizing a private import, preserves existing behavior when available, and adds targeted regression coverage for both compatibility paths.
Pull request overview
This PR improves OpenVINOOptimumConversion compatibility with older optimum-intel versions by avoiding an unconditional import of the private _GPTOSSQuantizationConfig type, preventing misleading “please install optimum[openvino]” failures during import while preserving GPT-OSS behavior when available.
Changes:
- Add
_is_gptoss_quantization_confighelper to detect GPT-OSS quantization config only when the private symbol exists. - Remove the unconditional
_GPTOSSQuantizationConfigimport from the OpenVINO Optimum conversion path and gate_main_quantizeaccordingly. - Add regression tests covering both “symbol present” and “symbol absent” scenarios.
File summaries
| File | Description |
|---|---|
olive/passes/openvino/optimum_intel.py |
Makes GPT-OSS quantization type detection optional to maintain compatibility across optimum-intel versions. |
test/passes/openvino/test_openvino_optimum_conversion.py |
Adds regression tests verifying correct behavior when _GPTOSSQuantizationConfig is present or missing. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Describe your changes
Fixes #2344.
OpenVINOOptimumConversionunconditionally imports the private_GPTOSSQuantizationConfigsymbol. Versions of optimum-intel that predate that GPT-OSS helper do not expose the symbol, so an otherwise valid OpenVINO installation fails during import and Olive reports the misleading "Please install Intel® optimum[openvino]" error.The GPT-OSS-specific type is now treated as an optional compatibility feature. On versions that provide it, existing GPT-OSS behaviour is unchanged. On older versions, normal quantization configurations continue through the standard
_main_quantizepath.Tests
Adds regression coverage for both optimum-intel configurations that expose
_GPTOSSQuantizationConfigand versions where the private symbol is absent.