-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Good First Issue]: Enable CompiledModel set/get property() #24374
Comments
.take |
Thank you for looking into this issue! Please let us know if you have any questions or require any help. |
Hello @Aryan8912, there are currently three issues with open PRs assigned to you. Please finish them before picking more tasks. |
hello, Is it possible being assigned to this issue? |
.take |
Thank you for looking into this issue! Please let us know if you have any questions or require any help. |
hey @Plomo-02 do you need any help? |
.take |
Thank you for looking into this issue! Please let us know if you have any questions or require any help. |
Hi @almilosz @vishniakov-nikolai, I have encountered an issue while testing the implementation of
It seems like there is a template: openvino/src/plugins/template/src/compiled_model.cpp Lines 83 to 87 in 3056b53
But only one plugin implements that: openvino/src/plugins/auto_batch/src/compiled_model.cpp Lines 163 to 175 in 3056b53
Other have: openvino/src/plugins/intel_cpu/src/compiled_model.h Lines 38 to 41 in 3056b53
My implementation so far: Napi::Value CompiledModelWrap::set_property(const Napi::CallbackInfo &info) {
Napi::Env env = info.Env();
try{
if (info.Length() != 1 || !info[0].IsObject()) {
OPENVINO_THROW("Expected a single object argument for setting properties");
}
const auto properties = to_anyMap(env, info[0]);
_compiled_model.set_property(properties);
}catch (const std::exception& e) {
reportError(env, e.what());
}
return env.Undefined();
} My questionHow should I test it? |
Hi @nashez, the issue is still under development. I have everything implemented but this test for |
Hi @hub-bla! timeout = 10
cm = core.compile_model(model, "BATCH:CPU")
cm.set_property(props.auto_batch_timeout(timeout))
assert timeout == cm.get_property('AUTO_BATCH_TIMEOUT') To do that in Node.js API you will have to expose cm.set_property({'AUTO_BATCH_TIMEOUT': 1}) Let me know what you decide to do. If you have any questions, don't hesitate to ask them. You can reach me on Discord Greetings from Poznań, |
@almilosz I found that if you change Is it enough reason for not exposing Thank you for your hint! Poznań? Never heard of it ;) |
Yes, please create a test like this in a new file |
I looked into the problem with conversion and I think I found the reason why. openvino/src/bindings/js/node/src/helper.cpp Lines 153 to 180 in dd2f614
js_to_cpp which is used in to_anyMap returns int32_t But in auto-batch CompiledModel::set_property we can see it tries to convert it as uint32_t openvino/src/plugins/auto_batch/src/compiled_model.cpp Lines 163 to 175 in d253f4f
and .as<std::uint32_t>() is the operation that failsopenvino/src/core/include/openvino/core/any.hpp Lines 850 to 865 in d253f4f
|
### Details: - add 2 methods: `CompiledModel::set_property()` and `CompiledModel::get_property()` - create TypeScript definition for new created methods - create unit tests for new functionalities (due to the issue that was mentioned [here](#24374 (comment)), it's more of a mock now and should be altered as soon as the issue is fixed) ### Tickets: - 134825
Context
Node.js API is the newest binding of OpenVINO.
The task is to expose 2 methods: CompiledModel::set_property() and CompiledModel::get_property().
C++ docs here
What needs to be done?
Tip: Before creating a new function to convert an argument, take a look at helper methods to see if it doesn't exist already
Example Pull Requests
Core
class withgetAvailableDevices
#22100Resources
Contact points
@almilosz @vishniakov-nikolai
Ticket
134825
The text was updated successfully, but these errors were encountered: