microsoft / microsoft/onnxruntime

[Documentation] OpenVINO Execution Provider load_config documentation may be incorrect

Open
#26,562 1 comment 0 reactions 0 assignees View on GitHub
documentation ep:OpenVINO
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the documentation issue

load_config is shown as a **filename** in the [Python Example](https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#python).

However for me to get it to work I need to specify the json as a **value**. This is running on Windows; openvino 2025.3.0; onnxruntime-openvino 1.23.0

e.g. When using the following loader fails for me:

```
# test to see if load_config works as a file. Because this is what the documentation says it is.
def load_config_is_a_json_filename(model_path):
config = {
"NPU": {
"LOG_LEVEL": "LOG_DEBUG",
}
}

config_filename = "npu_config.json"
with open(config_filename, "w") as f:
json.dump(config, f)

options = {
"device_type": "NPU",
"load_config": config_filename
}
session = ort.InferenceSession(model_path,
providers=[("OpenVINOExecutionProvider", options)])
return session

```
with:
```
2025-11-12 16:57:27.1012189 [E:onnxruntime:Default, provider_bridge_ort.cc:2197 onnxruntime::OpenVINOProviderFactoryCreator::Create] C:\Users\Administrator\Documents\jatin\python_samplesss\onnxruntime\onnxruntime\core\providers\openvino\openvino_provider_factory.cc:286 class std::map,class std::allocator >,class std::map,class std::allocator >,class ov::Any,struct std::less,class std::allocator > >,class std::allocator,class std::allocator > const ,class ov::Any> > >,struct std::less,class std::allocator > >,class std::allocator,class std::allocator > const ,class std::map,class std::allocator >,class ov::Any,struct std::less,class std::allocator > >,class std::allocator,class std::allocator > const ,class ov::Any> > > > > > __cdecl onnxruntime::openvino_ep::ParseProviderInfo::::operator ()(const class std::basic_string,class std::allocator > &) const JSON parsing error: [json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid literal; last read: 'np'
```

However the following works for me:
```
def load_config_is_json_value1(model_path):
options = {
"device_type": "NPU",
"load_config": "{\"NPU\":{\"LOG_LEVEL\":\"LOG_NONE\"}}"
}

session = ort.InferenceSession(model_path,
providers=[("OpenVINOExecutionProvider", options)])
return session
```

### Page / URL

https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html#python

Contributor guide

Open the contributing guide

Research direction

Read the OpenVINO Execution Provider page and its Python Example at the linked documentation URL, focusing on how load_config is described. Compare that description with the reported filename and JSON-value examples, then update the documentation so the accepted form is accurate and verify the example is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.