Skip to content

Require compatible optimum-intel for OpenVINO conversion - #2650

Merged
Xiaoyu Z (xiaoyu-work) merged 3 commits into
microsoft:mainfrom
sylvesterkaczmarek:fix/optimum-intel-gptoss-compat
Sep 11, 2026
Merged

Xiaoyu Z (xiaoyu-work) merged 3 commits into
microsoft:mainfrom
sylvesterkaczmarek:fix/optimum-intel-gptoss-compat

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek Sylvester Kaczmarek (sylvesterkaczmarek) commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Describe your changes

Fixes #2344.

OpenVINOOptimumConversion imports _GPTOSSQuantizationConfig, which was introduced in optimum-intel 1.26.0. The OpenVINO dependency set now requires optimum-intel>=1.26.0, and the OpenVINO test requirements use the same minimum version. This prevents an older incompatible optimum-intel release from being installed without adding a runtime compatibility shim.

Tests

  • olive_config.json parses successfully
  • git diff --check passes

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.

@xiaoyu-work

Copy link
Copy Markdown
Member

Hi Sylvester Kaczmarek (@sylvesterkaczmarek), I don't think this PR is needed. We want to support the latest version for Optimum Intel, and all legacy recipes should pin the package version, so we don't need to handle compatibility issues with older versions. I would suggest adding minimum version pin here to avoid the error

@xiaoyu-work Xiaoyu Z (xiaoyu-work) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Update Olive required package version pin instead

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Updated to the dependency-floor approach. OpenVINO now requires optimum-intel>=1.26.0, the first release with _GPTOSSQuantizationConfig; the test requirement matches, and the compatibility shim is removed.

@sylvesterkaczmarek Sylvester Kaczmarek (sylvesterkaczmarek) changed the title Fix OpenVINO conversion with older optimum-intel Require compatible optimum-intel for OpenVINO conversion Sep 10, 2026
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Xiaoyu Z (@xiaoyu-work) The current head contains only the optimum-intel>=1.26.0 dependency floor and matching test requirement; the compatibility shim is removed. Please re-review the dependency-only revision.

@xiaoyu-work

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

The Azure rerun did not reach the unit tests. Both Linux and Windows fail at Hugging Face login: Linux has no hf_token value and Windows reports the token as invalid. The subsequent test-result upload failures are just because no tests ran. This appears to be external-PR CI infrastructure rather than a failure in the dependency-floor change.

@xiaoyu-work
Xiaoyu Z (xiaoyu-work) merged commit d953076 into microsoft:main Sep 11, 2026
16 of 18 checks passed
@sylvesterkaczmarek

Copy link
Copy Markdown
Contributor Author

Thanks for the guidance on simplifying this to the dependency-floor approach, and for the review and merge.

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

3 participants