Skip to content

[DRAFT][PYAPI] Retry with explicit UTF-8 path decoding.#36302

Open
mryzhov wants to merge 1 commit into
openvinotoolkit:masterfrom
mryzhov:win_path_python_api
Open

[DRAFT][PYAPI] Retry with explicit UTF-8 path decoding.#36302
mryzhov wants to merge 1 commit into
openvinotoolkit:masterfrom
mryzhov:win_path_python_api

Conversation

@mryzhov

@mryzhov mryzhov commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Details:

  • item1
  • ...

Tickets:

  • ticket-id

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

@mryzhov mryzhov requested review from a team as code owners June 8, 2026 11:03
@mryzhov mryzhov requested a review from Copilot June 8, 2026 11:04
@github-actions github-actions Bot added category: inference OpenVINO Runtime library - Inference category: Python API OpenVINO Python bindings labels Jun 8, 2026

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.

Pull request overview

This PR updates the runtime cache directory path handling to better support non-ASCII (UTF-8) CACHE_DIR values on Windows, particularly for Python API scenarios, and adds Windows-only Python regression tests to cover Unicode cache directory names.

Changes:

  • Add a Windows-only fallback in cache directory parsing to retry path creation using std::filesystem::u8path() if the initial conversion throws.
  • Add Windows-only Python tests that set CACHE_DIR to non-ASCII paths (including emoji/Cyrillic) via both str and pathlib.Path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/inference/src/dev/core_impl.cpp Adds a Windows fallback path decoding attempt for CACHE_DIR when converting from config.
src/bindings/python/tests/test_runtime/test_core.py Adds Windows-only regression tests for Unicode CACHE_DIR values passed to Core.read_model(...).

Comment on lines +432 to +433
// Python bindings pass UTF-8 strings; if locale-based conversion fails,
// retry with explicit UTF-8 path decoding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: inference OpenVINO Runtime library - Inference category: Python API OpenVINO Python bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants