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

[C-Api/Service] add new API (ML-API ext) #454

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

jaeyun-jung
Copy link
Collaborator

Add new API set for ML service, these functions support constructing new handle from json configuration.

  • type for ml-service: single, pipeline

TODO: need discussion for ml-service remote

@taos-ci
Copy link
Collaborator

taos-ci commented Feb 2, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #454. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

@taos-ci
Copy link
Collaborator

taos-ci commented Feb 2, 2024

:octocat: cibot: @jaeyun-jung, Oooops. The commit has an invalid executable file. The file is c/src/ml-api-service-extension.c. Please turn the executable bits off. Run chmod 644 file-name command.

@taos-ci
Copy link
Collaborator

taos-ci commented Feb 2, 2024

:octocat: cibot: @jaeyun-jung, Oooops. The commit has an invalid executable file. The file is c/src/ml-api-service-extension.c. Please turn the executable bits off. Run chmod 644 file-name command.

@taos-ci
Copy link
Collaborator

taos-ci commented Feb 2, 2024

:octocat: cibot: @jaeyun-jung, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nnstreamer-api/ci/repo-workers/pr-checker/454-202402021451340.98993110656738-dfa65eeafcd1e1cd638118af8f7e3580c28fe429/.

@taos-ci
Copy link
Collaborator

taos-ci commented Feb 5, 2024

:octocat: cibot: @jaeyun-jung, A builder checker could not be completed because one of the checkers is not completed. In order to find out a reason, please go to http://ci.nnstreamer.ai/nnstreamer-api/ci/repo-workers/pr-checker/454-202402051904550.42917990684509-6ef890d22bfc463726bd62464d9a10b248c90b1a/.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Contributor

@niley7464 niley7464 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your hard work in establishing the structure of the API that will be developed in the future.

typedef struct {
void (*new_data) (ml_service_h handle, const char *name, const ml_tensors_data_h data, void *user_data); /**< Called when new data is processed from machine learning service. */
void (*event) (ml_service_h handle, int event, void *event_data, void *user_data); /**< Called when new event is occurred from machine learning service. */
} ml_service_callbacks_s;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tizen does not encourage structure-type event callbacks.
It seems that ml_service_callback_s event callbacks can be combined into one like this.

void (*event_callback) (ml_service_h handle, void *event_data, ... );

In the case of void *event_data, how about to use the one with information-handle we released since tizen8.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, thanks for your suggestion.
We are now preparing Tizen API process as you know.
Let's talk about the event callback and its params on offline discussion, to handle new-data for inference and other events from offloading service.

Copy link
Member

@gichan-jang gichan-jang Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agreed with @niley7464 's suggestion.
Instead of the structure type event callback, how about this unified form?
ml_service can be passed using the user_data, so I think it's not needed.
And let's use information handle considering later scalability

void (*ml_service_event_cb) (int event_type, ml_information_h data, void *user_data);

Reference: Tizen guide

3.5.1 Callback function prototype MUST be based on the template
The template is:
typedef void (*{module_prefix}_{actual_name}_cb)(event_type event, {event details}, void *user_data);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this PR - added event callback.
Please review the changes again.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Contributor

@niley7464 niley7464 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thank you for considering my comment.

@jaeyun-jung jaeyun-jung force-pushed the capi-svc-new branch 4 times, most recently from b0d68e8 to 1f3a072 Compare March 14, 2024 06:31
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Copy link
Member

@gichan-jang gichan-jang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jaeyun-jung jaeyun-jung force-pushed the capi-svc-new branch 2 times, most recently from c035ed4 to 562f521 Compare March 15, 2024 07:22
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

@jaeyun-jung jaeyun-jung force-pushed the capi-svc-new branch 2 times, most recently from 61afe74 to e176449 Compare March 19, 2024 03:22
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

Add new API set for ML service, these functions support constructing new handle from json configuration.
- type for ml-service: single, pipeline

Signed-off-by: Jaeyun Jung <[email protected]>
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaeyun-jung, 💯 All CI checkers are successfully verified. Thanks.

@jaeyun-jung
Copy link
Collaborator Author

Now ready to prepare new API for next Tizen release.

@jaeyun-jung jaeyun-jung merged commit 9133027 into nnstreamer:main Mar 25, 2024
29 checks passed
@jaeyun-jung jaeyun-jung deleted the capi-svc-new branch March 25, 2024 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants