microsoft / microsoft/onnxruntime

Issue in the Implementation for honoring model_external_initializers_file_folder_path for file-path model loads

Open
#32,054 2 comments 0 reactions 0 assignees View on GitHub
ep:OpenVINO stale
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the issue

During _import phase_ with _CreateSession_, when session.model_external_initializers_file_folder_path _alone_ is used, ORT is expecting the ".bin" file to exist inside the path pointed to by above argument.

The issue seems to happen because of the changes in following PR, which added support for using "model_external_initializers_file_folder_path" in case of loading model from file (_CreateSession_)
https://github.com/microsoft/onnxruntime/pull/29459

### To reproduce

- Generate EP Context(for example, for OpenVINO) using the onnxruntime_perf_test app using the following session options:

-C "ep.context_enable|1 ep.context_file_path|\ctx.onnx session.model_external_initializers_file_folder_path|

- Import EP Context using the onnxruntime_perf_test app using the following session options:

-C "session.model_external_initializers_file_folder_path|"

- Expected results:

Import succeeds

- Actual results:

Import Fails with following error message
Cannot open file: \ctx_OpenVINOExecutionProvider.bin

Note:
If we provide both "session.model_external_initializers_file_folder_path" and "ep.context_file_path" Import succeeds

### Urgency

_No response_

### Platform

Windows

### OS Version

Windows11

### ONNX Runtime Installation

Built from Source

### ONNX Runtime Version or Commit ID

https://github.com/microsoft/onnxruntime/pull/29459

### ONNX Runtime API

C++

### Architecture

X64

### Execution Provider

### Execution Provider Library Version

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the onnxruntime_perf_test app using the documented CreateSession and EP Context import commands, then inspect the changes from PR 29459. Compare imports using only session.model_external_initializers_file_folder_path with imports that also provide ep.context_file_path; done means the former succeeds without requiring the .bin file in the external-data folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.