-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Support fs::path in register_plugin(s) & Core(xml_file_path) #33043
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
base: master
Are you sure you want to change the base?
Support fs::path in register_plugin(s) & Core(xml_file_path) #33043
Conversation
| */ | ||
| void register_plugin(const std::string& plugin, const std::string& device_name, const ov::AnyMap& config = {}); | ||
|
|
||
| /** |
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.
There is no need to duplicate comment it can be shared with previous version
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 added brief descriptions. Methods without comments didn't appear in our documentation e.g. :
openvino/src/inference/include/openvino/runtime/core.hpp
Lines 113 to 114 in 8b4f28e
| template <class Path, std::enable_if_t<std::is_same_v<Path, std::filesystem::path>>* = nullptr> | |
| auto read_model(const Path& model_path, const Path& bin_path = {}, const ov::AnyMap& properties = {}) const { |
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.
There is like:
@{
@}
To group same functions with same description
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.
Looks like it's broken in our documentation. It is shown as Unnamed Group https://docs.openvino.ai/2025/api/c_cpp_api/classov_1_1_core.html#_CPPv4NK2ov4Core10read_modelERKNSt6stringERKNSt6stringERKN2ov6AnyMapE and the signature of auto read_model(const Path& model_path, is not visible
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.
Showing unamed group is OK
| } | ||
|
|
||
| TEST_F(CoreBaseTest, LoadPluginXMLWithFsPath) { | ||
| std::string xml_file_name = "test_plugin.xml"; |
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.
Why not create it as path at start and modify it?
Is better to change this test to cover some unicode case see tests
|
|
||
| std::string mock_plugin_name{"MOCK_HARDWARE_FS"}; | ||
| std::filesystem::path plugin_path = | ||
| ov::util::make_plugin_library_name(ov::test::utils::getExecutableDirectory(), |
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.
IS path version called?
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.
Yes
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.
How as inputs are strings?
|
|
||
| cls.def("register_plugins", | ||
| &ov::Core::register_plugins, | ||
| static_cast<void (ov::Core::*)(const std::string&)>(&ov::Core::register_plugins), |
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.
We should also consider how path is represented in Python API. In many places it's Union[str, bytes, pathlib.Path]
Details:
std::filesystem::pathTickets: