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]: Enable Model.getOps() method #25405

Open
almilosz opened this issue Jul 5, 2024 · 14 comments
Open

[Good First Issue]: Enable Model.getOps() method #25405

almilosz opened this issue Jul 5, 2024 · 14 comments
Assignees
Labels
category: JS API OpenVino JS API Bindings good first issue Good for newcomers no_stale Do not mark as stale

Comments

@almilosz
Copy link
Contributor

almilosz commented Jul 5, 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::Model::get_ops() method.
From JavaScript side it will be Model.getOps() method.
This method:

  • Doesn't have parameters
  • Returns array of ov::Node objects
    Node.js API doesn't have bindings for ov::Node. You need implement bindings
    for it. ov::Node has a lot of methods, you shouldn't implement all of them.
    Implement:

Useful links

  • C++ API implementation of Model::get_ops() method
  • Node.js API has similar implementation for Output<ov::Node>, use this as the
    reference to implement ov::Node class.

What needs to be done?

  • Create NodeWrap class that inherits from Napi::ObjectWrap and represents ov::Node, create a separate header and source file.
  • Implement NodeWrap as minimal wrapper of ov::Node with ov::Node.get_name() method.
  • Add ModelWrap.get_ops() method to ./src/bindings/js/node/src/model_wrap.cpp
  • Update TypeScript definitions in ./src/bindings/js/node/lib/addon.ts
  • Create unit test for added functionality using Node.js Test Runner. It might look similar to this (Python code as an example):
  model_operators = [op.get_name().split("_")[0] for op in model.get_ops()]
     expected_ops = [
         "Subtract",
         "Transpose",
     ]
     assert len(model_operators) == 14
     for op in expected_ops:
         assert op in model_operators

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

You may use this unfinished PR as the reference

Resources

Contact points

@almilosz @vishniakov-nikolai

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

@almilosz almilosz added good first issue Good for newcomers category: JS API OpenVino JS API Bindings no_stale Do not mark as stale labels Jul 5, 2024
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Jul 5, 2024
@spran180
Copy link

spran180 commented Jul 5, 2024

.take

Copy link
Contributor

github-actions bot commented Jul 5, 2024

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 Jul 8, 2024
@mlukasze mlukasze moved this from Assigned to In Review in Good first issues Jul 25, 2024
@almilosz almilosz linked a pull request Jul 29, 2024 that will close this issue
@p-wysocki
Copy link
Contributor

Reopening the task as the PR seems to have been abandoned.

@p-wysocki p-wysocki moved this from In Review to Contributors Needed in Good first issues Sep 2, 2024
@nashez
Copy link
Contributor

nashez commented Sep 23, 2024

@p-wysocki @almilosz Can I take this up if no one is working on it?

@mlukasze
Copy link
Contributor

it would be great, have fun!

@mlukasze mlukasze moved this from Contributors Needed to Assigned in Good first issues Sep 23, 2024
@mlukasze mlukasze moved this from Assigned to Contributors Needed in Good first issues Oct 1, 2024
@qxprakash
Copy link
Contributor

.take

Copy link
Contributor

github-actions bot commented Oct 7, 2024

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

@qxprakash
Copy link
Contributor

@almilosz I will give it a shot

@p-wysocki p-wysocki moved this from Contributors Needed to Assigned in Good first issues Oct 7, 2024
@qxprakash
Copy link
Contributor

@almilosz @vishniakov-nikolai sorry I got a but busy I'll raise a pr soon

@almilosz
Copy link
Contributor Author

If you have any issues with it, don't hesitate to ask :)

@qxprakash qxprakash removed their assignment Nov 4, 2024
@qxprakash
Copy link
Contributor

@almilosz can you please assign this to someone else , I have been busy a lot lately so couldn't make much progress , it's better to let someone else have a shot.

@mlukasze mlukasze moved this from Assigned to Contributors Needed in Good first issues Nov 4, 2024
@mlukasze
Copy link
Contributor

mlukasze commented Nov 4, 2024

no worries @qxprakash
thank you for your time, hope to see you again, later :)

task has been moved back to the available ones

@itsaflamingo
Copy link

itsaflamingo commented Dec 8, 2024

@almilosz I'd like to take up this issue:)

@mlukasze mlukasze moved this from Contributors Needed to Assigned in Good first issues Dec 9, 2024
@mlukasze
Copy link
Contributor

mlukasze commented Dec 9, 2024

it's yours, @itsaflamingo
have fun

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: Assigned
Development

Successfully merging a pull request may close this issue.

7 participants