Skip to content
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]: Expose ov.saveModel() functionality #27092

Closed
almilosz opened this issue Oct 16, 2024 · 7 comments · Fixed by #27148
Closed

[Good First Issue]: Expose ov.saveModel() functionality #27092

almilosz opened this issue Oct 16, 2024 · 7 comments · Fixed by #27148
Assignees
Labels
category: JS API OpenVino JS API Bindings good first issue Good for newcomers no_stale Do not mark as stale
Milestone

Comments

@almilosz
Copy link
Contributor

almilosz commented Oct 16, 2024

Context

OpenVINO works in Node.js environment!
We are looking for new contributors who can help with enabling C++ API methods
in JavaScript side.

First of all read Node.js API Contribution Guide.

Task Details

Expose ov::save_model() method.
From JavaScript side it will be ov.saveModel() method.
This method takes 3 arguments: model to save, path to output model file and bool value whether to compress floating point weights to FP16.

Useful links

What needs to be done?

  • Propose the place where the ov.saveModel() method should be implemented. It might be
    ./src/bindings/js/node/src/addon.cpp. Implement the method.
  • Test manually if the functionality is working with different models. Describe in the PR what models were tested in which formats.
  • Update TypeScript definitions in ./src/bindings/js/node/lib/addon.ts
  • Create unit test for added functionality using Node.js Test Runner. The logic might be similar to the Python tests for this functionality. Link to Python API tests

How to take this issue

To take this issue leave text: .take as the comment in this issue.
It will assign this issue to you automatically. Please, make sure that the issue has the status Contributors Needed and doesn't have another user in Assingnees.

Example Pull Requests

Resources

Contact points

@almilosz @vishniakov-nikolai

Please, mention us in this issue discussion if you have any questions.

Ticket

No response

@almilosz almilosz added good first issue Good for newcomers no_stale Do not mark as stale labels Oct 16, 2024
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Oct 16, 2024
@almilosz almilosz added the category: JS API OpenVino JS API Bindings label Oct 16, 2024
@hub-bla
Copy link
Contributor

hub-bla commented Oct 19, 2024

.take

Copy link
Contributor

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

@mlukasze mlukasze moved this from Contributors Needed to Assigned in Good first issues Oct 21, 2024
@mlukasze mlukasze added this to the 2025.0 milestone Nov 6, 2024
@MVARUNREDDY8203
Copy link

.take

Copy link
Contributor

Thanks for being interested in this issue. It looks like this ticket is already assigned to a contributor. Please communicate with the assigned contributor to confirm the status of the issue.

@MVARUNREDDY8203
Copy link

@hub-bla are you still working on the issue?

@hub-bla
Copy link
Contributor

hub-bla commented Nov 12, 2024

@MVARUNREDDY8203 It's already done but not merged yet.

github-merge-queue bot pushed a commit that referenced this issue Nov 18, 2024
### Details:
- Created `init_function` to initialize functions directly in the addon.
 - Extended `type_validation` with `Napi::Boolean`
 - Exposed `ov.saveModel`
- To make proper tests like in Python API I guess I have to wait for
`Model.getOps()` to be exposed.

### Tickets:
 - Closes - #27092

---------

Co-authored-by: Vishniakov Nikolai <[email protected]>
Co-authored-by: Michal Lukaszewski <[email protected]>
@almilosz almilosz linked a pull request Nov 19, 2024 that will close this issue
@vishniakov-nikolai vishniakov-nikolai moved this from In Review to Closed in Good first issues Nov 19, 2024
@almilosz
Copy link
Contributor Author

Merged. Thanks for contribution!

NishantPrabhuFujitsu pushed a commit to NishantPrabhuFujitsu/openvino that referenced this issue Nov 26, 2024
### Details:
- Created `init_function` to initialize functions directly in the addon.
 - Extended `type_validation` with `Napi::Boolean`
 - Exposed `ov.saveModel`
- To make proper tests like in Python API I guess I have to wait for
`Model.getOps()` to be exposed.

### Tickets:
 - Closes - openvinotoolkit#27092

---------

Co-authored-by: Vishniakov Nikolai <[email protected]>
Co-authored-by: Michal Lukaszewski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: JS API OpenVino JS API Bindings good first issue Good for newcomers no_stale Do not mark as stale
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants