-
Notifications
You must be signed in to change notification settings - Fork 56
CVS-176081: Add support for nested maps to load_config parsing #844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 adds support for nested maps in load_config parsing by introducing recursive handling of JSON objects up to 8 levels deep. The change refactors inline map parsing logic into a dedicated function that can handle nested object structures.
Key Changes:
- Introduced recursive
ParseInnerMapfunction to handle nested JSON objects - Added maximum nesting depth limit of 8 levels with validation
- Replaced inline parsing code with call to the new helper function
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
onnxruntime/core/providers/openvino/openvino_provider_factory.cc
Outdated
Show resolved
Hide resolved
onnxruntime/core/providers/openvino/openvino_provider_factory.cc
Outdated
Show resolved
Hide resolved
|
@MayureshV1 -- Please review / merge. Thanks! |
MayureshV1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
| inner_map[inner_key] = std::move(inner_inner_map); | ||
| } else { | ||
| LOGS_DEFAULT(WARNING) << "Unsupported JSON value type for key: " << inner_key << ". Skipping key."; | ||
| LOGS_DEFAULT(WARNING) << "This will become an error in a future OpenVINO Execution Provider release."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we are discussing this, but is there a reason why this is logged out?
ankitm3k
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I hope this has been tested thoroughly, only caveat I see is the recursion call is restricted to 8 levels, this needs to be documented if the user passes more than 8 then he would run into exception. @RyanMetcalfeInt8
MayureshV1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
gblong1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ref: CVS-176081