Skip to content

Fix OpenVINO conversion with older optimum-intel - #2650

Open
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
microsoft:mainfrom
sylvesterkaczmarek:fix/optimum-intel-gptoss-compat
Open

Fix OpenVINO conversion with older optimum-intel#2650
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 2 commits into
microsoft:mainfrom
sylvesterkaczmarek:fix/optimum-intel-gptoss-compat

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Describe your changes

Fixes #2344.

OpenVINOOptimumConversion unconditionally imports the private _GPTOSSQuantizationConfig symbol. 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_quantize path.

Tests

Adds regression coverage for both optimum-intel configurations that expose _GPTOSSQuantizationConfig and versions where the private symbol is absent.

Copilot AI lite review requested due to automatic review settings September 3, 2026 19:45
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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_config helper to detect GPT-OSS quantization config only when the private symbol exists.
  • Remove the unconditional _GPTOSSQuantizationConfig import from the OpenVINO Optimum conversion path and gate _main_quantize accordingly.
  • 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

optimum[openvino] 2.1.0 breaks compatibility with AITK olive-recipes

2 participants