platform/core/api/machine-learning.git
16 months ago[service] Change error code `not_support` into `io_error`
Yongjoo Ahn [Fri, 24 Mar 2023 04:13:08 +0000 (13:13 +0900)]
[service] Change error code `not_support` into `io_error`

- If failed to connect with dbus, return ML_ERROR_IO_ERROR
  rather than ML_ERROR_NOT_SUPPORTED, which should be check with tizen
  feature.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[test] Fix mem leak of ml_option
Yongjoo Ahn [Wed, 22 Mar 2023 08:09:50 +0000 (17:09 +0900)]
[test] Fix mem leak of ml_option

- Add missing `ml_option_destroy`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[agent] Print exception message
Yongjoo Ahn [Wed, 22 Mar 2023 08:09:02 +0000 (17:09 +0900)]
[agent] Print exception message

- Print exception message rather than simple error log

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[CodeClean] handle error case accepted/tizen/unified/20230321.123159
Jaeyun Jung [Mon, 20 Mar 2023 07:44:34 +0000 (16:44 +0900)]
[CodeClean] handle error case

Code clean, handle res-leak if error occurs.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[test][service] Add testcases using ml_service_model APIs
Yongjoo Ahn [Tue, 7 Mar 2023 11:22:47 +0000 (20:22 +0900)]
[test][service] Add testcases using ml_service_model APIs

- Add some TCs using the new APIs.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[service/model] Implement new APIS ml_service_model_*
Yongjoo Ahn [Tue, 7 Mar 2023 11:18:40 +0000 (20:18 +0900)]
[service/model] Implement new APIS ml_service_model_*

- Add build dependency for the json-glib in .spec and meson.build
- Implement new APIs using dbus glib apis.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[common/option] Implement new API ml_option_get.
Yongjoo Ahn [Tue, 7 Mar 2023 11:16:52 +0000 (20:16 +0900)]
[common/option] Implement new API ml_option_get.

- Implement ml_option_get which returns the paired value of given key
  in the ml_option instance.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[daemon] Implement dbus method callbacks
Yongjoo Ahn [Tue, 7 Mar 2023 11:03:52 +0000 (20:03 +0900)]
[daemon] Implement dbus method callbacks

- Implement callback for each dbus methods:
  register, update_description, activate,
  get, get_activated, get_all, delete

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[daemon][DB] Update/Add service-db methods in sqlite3 backend
Yongjoo Ahn [Tue, 7 Mar 2023 10:54:13 +0000 (19:54 +0900)]
[daemon][DB] Update/Add service-db methods in sqlite3 backend

- Update set_model, get_model, delete_model methods.
- Add udpate_model_description, activate_model methods.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[daemon] Add dbus methods to handle model service APIs
Yongjoo Ahn [Tue, 7 Mar 2023 10:43:19 +0000 (19:43 +0900)]
[daemon] Add dbus methods to handle model service APIs

- Update model-dbus.xml.
- Update the header interface dbus-interface.h

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
16 months ago[Tizen] Fix gcno file path of gcov pacakge.
gichan [Mon, 20 Mar 2023 05:21:10 +0000 (14:21 +0900)]
[Tizen] Fix gcno file path of gcov pacakge.

Tizen line coverage automation tool includes build dir path.
Fix gcno file path of gcov pacakge for compatibility with the tool.

Signed-off-by: gichan <gichan2.jang@samsung.com>
16 months ago[Service/Model] define new API
Jaeyun Jung [Fri, 24 Feb 2023 05:27:24 +0000 (14:27 +0900)]
[Service/Model] define new API

Define new function and info handle for machine learning models.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Service] handle table version
Jaeyun Jung [Thu, 9 Mar 2023 07:11:59 +0000 (16:11 +0900)]
[Service] handle table version

Handle table version. If table schema is changed, we should implement data migration later.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Service] validate model path
Jaeyun Jung [Mon, 13 Mar 2023 07:23:21 +0000 (16:23 +0900)]
[Service] validate model path

Validate model path when registering a model to database.
It should be an absolute path and not symbol link file.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Test] name to root directory
Jaeyun Jung [Mon, 13 Mar 2023 06:52:01 +0000 (15:52 +0900)]
[Test] name to root directory

Fix name to root directory, use prefix 'MLAPI_'.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Build] remove dependency to leveldb
Jaeyun Jung [Fri, 10 Mar 2023 08:15:46 +0000 (17:15 +0900)]
[Build] remove dependency to leveldb

Change database to sqlite, remove dependency to leveldb.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[service] Add TCs using ml_service_delete_pipeline accepted/tizen/unified/20230223.162150
Yongjoo Ahn [Wed, 22 Feb 2023 09:15:15 +0000 (18:15 +0900)]
[service] Add TCs using ml_service_delete_pipeline

- Add some negative testcases.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[agent][DB] Fix "delete_pipeline" to check the number of changed rows
Yongjoo Ahn [Wed, 22 Feb 2023 09:11:29 +0000 (18:11 +0900)]
[agent][DB] Fix "delete_pipeline" to check the number of changed rows

- Check the number of changed rows after the DELETE query

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[Service/CodeClean] separate method to init database
Jaeyun Jung [Fri, 17 Feb 2023 07:52:31 +0000 (16:52 +0900)]
[Service/CodeClean] separate method to init database

Code clean, sepatate method to initialize ml-service database.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Build] dependency to pkgmgr on ubuntu
Jaeyun Jung [Fri, 17 Feb 2023 07:56:18 +0000 (16:56 +0900)]
[Build] dependency to pkgmgr on ubuntu

Fix build error on ubuntu, dependency to pkgmgr.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Service/PkgMgr] Add skeleton code for the package manager
Sangjung Woo [Wed, 15 Feb 2023 05:18:17 +0000 (14:18 +0900)]
[Service/PkgMgr] Add skeleton code for the package manager

To get the event from the package manager, the callback function should
be registered in ML Agent. This patch adds the skeleton code to get the
install, uninstall, and upgrade event of the resource package from the
package manager. Related work such as update the database of ML Agent
should be needed.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
17 months ago[service] Add simple test using the new API
Yongjoo Ahn [Mon, 13 Feb 2023 06:50:43 +0000 (15:50 +0900)]
[service] Add simple test using the new API

- Add a simple TC using API `ml_service_model_register`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[service] Initial commit for the C-API `ml_service_model_register`
Yongjoo Ahn [Mon, 13 Feb 2023 06:47:26 +0000 (15:47 +0900)]
[service] Initial commit for the C-API `ml_service_model_register`

- Initial commit for the new API, which register model

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[service] Add util function to get model daemon proxy
Yongjoo Ahn [Mon, 13 Feb 2023 06:34:24 +0000 (15:34 +0900)]
[service] Add util function to get model daemon proxy

- Add function to get proxy of the model d-bus interface
- "mlsm" stands for MachineLearningServiceModel

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[agent] Add initial commit for "model_register" method to the daemon
Yongjoo Ahn [Mon, 13 Feb 2023 06:27:51 +0000 (15:27 +0900)]
[agent] Add initial commit for "model_register" method to the daemon

- Add initial commit of "model_register" method.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[agent] Rename a util function getting dbus proxy
Yongjoo Ahn [Mon, 13 Feb 2023 06:11:04 +0000 (15:11 +0900)]
[agent] Rename a util function getting dbus proxy

- Rename `_get_proxy_new_for_bus_sync` -> `_get_mlsp_proxy_new_for_bus_sync`
- `mlsp` stands for MachineLearningServicePipeline

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[dbus] Add DBus interface for model management
Yongjoo Ahn [Fri, 10 Feb 2023 09:10:39 +0000 (18:10 +0900)]
[dbus] Add DBus interface for model management

- Add Register, Update, Rollback, SetInference, Get, GetLatest interfaces.
  These will be used by new ml-service APIS for model management.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[daemon] Remove outdated dbus methods
Yongjoo Ahn [Tue, 14 Feb 2023 04:36:57 +0000 (13:36 +0900)]
[daemon] Remove outdated dbus methods

- Remove outdated dbus call for model (get_path, set_path, delete)
- Remove related testcases.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
17 months ago[Service] replace ml-service DB
Jaeyun Jung [Tue, 7 Feb 2023 08:45:34 +0000 (17:45 +0900)]
[Service] replace ml-service DB

Replace ml-service database to sqlite3.

TODO:
- handle database version.
- implement methods for model info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Single] Fix coverity issue
Sangjung Woo [Thu, 16 Feb 2023 05:44:01 +0000 (14:44 +0900)]
[Single] Fix coverity issue

This patch adds the error number for the missing argument of the format
specifier.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
17 months agoc-api: Update API error messages accepted/tizen/unified/20230215.155635
MyungJoo Ham [Mon, 13 Feb 2023 08:35:50 +0000 (17:35 +0900)]
c-api: Update API error messages

This fixes https://github.com/nnstreamer/nnstreamer/issues/4015

that didn't give appropriate error messages.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
17 months ago[Service/CodeClean] change class name
Jaeyun Jung [Tue, 7 Feb 2023 07:59:43 +0000 (16:59 +0900)]
[Service/CodeClean] change class name

Code clean, we will change the database later - level-db to sqlite.
Change class name and remove interface to ML-Service DB.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Service/CodeClean] handle error case
Jaeyun Jung [Fri, 3 Feb 2023 05:05:59 +0000 (14:05 +0900)]
[Service/CodeClean] handle error case

Code clean, handle error case in service-db.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Tizen/PPM] deprecated API from 7.5
Jaeyun Jung [Fri, 3 Feb 2023 04:54:07 +0000 (13:54 +0900)]
[Tizen/PPM] deprecated API from 7.5

From Tizen 7.5, privacy-privilege-mgr API will be deprecated.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Service] dependency to sqlite
Jaeyun Jung [Tue, 31 Jan 2023 05:55:52 +0000 (14:55 +0900)]
[Service] dependency to sqlite

Add dependency to sqlite and cleanup, mark todo to remove leveldb for future work.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[C-Api/Single] invalid data handle in invoke thread accepted/tizen/unified/20230131.162135
Jaeyun Jung [Thu, 26 Jan 2023 07:46:42 +0000 (16:46 +0900)]
[C-Api/Single] invalid data handle in invoke thread

Prevent error case - null data ptr in invoke thread.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
18 months ago[Single] prevent use-after-free case accepted/tizen/unified/20230118.172043
Jaeyun Jung [Tue, 17 Jan 2023 08:15:41 +0000 (17:15 +0900)]
[Single] prevent use-after-free case

Clone input data in single-shot, to prevent use-after-free case when invoking a model with timed out option.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.net>
18 months ago[C-Api] new function to copy data handle
Jaeyun Jung [Tue, 17 Jan 2023 08:13:10 +0000 (17:13 +0900)]
[C-Api] new function to copy data handle

Add new util function to copy tensor data.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.net>
18 months ago[Service] handle dbus error case
Jaeyun [Mon, 2 Jan 2023 08:03:12 +0000 (17:03 +0900)]
[Service] handle dbus error case

Check returned val and handle error case when failed to invoke dbus methods.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months ago[C-Api] fix typo
Jaeyun [Thu, 12 Jan 2023 16:21:10 +0000 (01:21 +0900)]
[C-Api] fix typo

Fix typo in sample code for custom easy filter.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months agoriscv64: Add RISC-V support
Marek Pikuła [Mon, 14 Nov 2022 12:07:54 +0000 (13:07 +0100)]
riscv64: Add RISC-V support

Add riscv64 architecture to the supported arch list.

Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
18 months ago[Single] set tensors-info in output handle accepted/tizen/unified/20230103.164730
Jaeyun [Mon, 2 Jan 2023 05:20:43 +0000 (14:20 +0900)]
[Single] set tensors-info in output handle

The output tensor does not contain the tensors-info when invoking the model.
Update in/out tensors-info in single-shot handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months ago[Test] feature state in tizen test
Jaeyun [Mon, 2 Jan 2023 06:51:17 +0000 (15:51 +0900)]
[Test] feature state in tizen test

Set feature state after all testcases are done.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months ago[gcov] Exclude test gcno files
gichan [Mon, 2 Jan 2023 05:53:20 +0000 (14:53 +0900)]
[gcov] Exclude test gcno files

Exclude test related gcno files from gcov package.

Signed-off-by: gichan <gichan2.jang@samsung.com>
18 months ago[Build] error on old ubuntu
Jaeyun [Mon, 2 Jan 2023 05:24:45 +0000 (14:24 +0900)]
[Build] error on old ubuntu

Fix typo and build error on olb ubuntu.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months ago[Service] fix signal name
Jaeyun [Mon, 2 Jan 2023 05:06:06 +0000 (14:06 +0900)]
[Service] fix signal name

Set exact signal name for ml-service daemon.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
18 months ago[Test] fix double free case
Jaeyun [Mon, 2 Jan 2023 03:24:40 +0000 (12:24 +0900)]
[Test] fix double free case

Fix double free case in ml-service testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
19 months ago[Meson] dependency to build ml-service accepted/tizen/unified/20221226.070013
Jaeyun [Mon, 19 Dec 2022 05:13:41 +0000 (14:13 +0900)]
[Meson] dependency to build ml-service

Code clean to build ml-service,
- fix dependency to gio library.
- remove unnecessary declaration in meson script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
19 months ago[coverage] Remove unnecessary flags
gichan [Wed, 21 Dec 2022 10:38:45 +0000 (19:38 +0900)]
[coverage] Remove unnecessary flags

We use meson's option(b_coverage) to measure coverage, so the flags are unnecessary.

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[lcov] Change directory before generate html result.
gichan [Wed, 21 Dec 2022 10:35:15 +0000 (19:35 +0900)]
[lcov] Change directory before generate html result.

After gcno files path was changed from the absolute path to the relative path, the codes of coverage were not properly displayed. Change the build directory before generating the html result.

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[build/android] Add missing arg in build.gradle
Yongjoo Ahn [Mon, 19 Dec 2022 04:33:15 +0000 (13:33 +0900)]
[build/android] Add missing arg in build.gradle

- Add missing arg NNSTREAMER_EDGE_ROOT in build.gradle

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[Meson] cleanup dependencies to common library
Jaeyun [Tue, 13 Dec 2022 09:56:40 +0000 (18:56 +0900)]
[Meson] cleanup dependencies to common library

Code clean, declare dependency to common library and cleanup meson script.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
19 months ago[meson] Construct paths automatically not manually.
gichan [Fri, 9 Dec 2022 05:48:18 +0000 (14:48 +0900)]
[meson] Construct paths automatically not manually.

Costruct paths automatically ussing `files` not manually.
This patch fixes wrong object file names.
Foe example:
before:
_home_abuild_rpmbuild_BUILD_capi-machine-learning-inference-1.8.3_c_src_ml-api-inference-internal.c.o
after: src_ml-api-inference-internal.c.o

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[Tizen] Generate packages for automation test tools
gichan [Thu, 8 Dec 2022 07:13:51 +0000 (16:13 +0900)]
[Tizen] Generate packages for automation test tools

 - Generate gcov and unittest package with "gcov 1" option for tizen test
automation tools.

Signed-off-by: gichan <gichan2.jang@samsung.com>
19 months ago[android] Add a testcase for tensor_query
Yongjoo Ahn [Mon, 17 Oct 2022 07:44:43 +0000 (16:44 +0900)]
[android] Add a testcase for tensor_query

- Add a simple Pipeline API TC for tensor_query.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[android/build] Build tensor_query with nnstreamer-edge sources
Yongjoo Ahn [Fri, 14 Oct 2022 01:48:37 +0000 (10:48 +0900)]
[android/build] Build tensor_query with nnstreamer-edge sources

- Define source files to build tensor_query elements.
- User should set envvar "NNSTREAMER_EDGE_ROOT" (path to nnstreamer-edge source dir)
  to build tensor_query.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
19 months ago[Common] mem leak case
Jaeyun [Tue, 29 Nov 2022 05:12:31 +0000 (14:12 +0900)]
[Common] mem leak case

Fix mem leak case when failed to create data handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
20 months ago[TEST] Initialize tensors info
Gichan Jang [Thu, 24 Nov 2022 02:08:36 +0000 (11:08 +0900)]
[TEST] Initialize tensors info

 - Initialize tensors info to fix build warning

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
21 months ago[android] Fix snpe test of multiple moutput model
Yongjoo Ahn [Fri, 14 Oct 2022 07:59:25 +0000 (16:59 +0900)]
[android] Fix snpe test of multiple moutput model

- Fix the snpe filter test. The usage of multiple output model was changed.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
21 months ago[C-Api/Service] clearly check returned errcode
Jaeyun [Wed, 5 Oct 2022 05:32:30 +0000 (14:32 +0900)]
[C-Api/Service] clearly check returned errcode

Code clean, clearly check returned error code of ML API.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[C-Api] feature for float16 type
Jaeyun [Tue, 4 Oct 2022 04:16:40 +0000 (13:16 +0900)]
[C-Api] feature for float16 type

Code clean, update feature name (same with nnstreamer repo) and size of float16 type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[Test] update test
Jaeyun [Tue, 4 Oct 2022 04:20:19 +0000 (13:20 +0900)]
[Test] update test

1. Fix invalid test name, to run unittest of data utils.
2. Code clean, add more negative testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[Version] update version to 1.8.3
Jaeyun [Fri, 30 Sep 2022 03:06:07 +0000 (12:06 +0900)]
[Version] update version to 1.8.3

Release 1.8.2 for Tizen 7.0 M2. Start implementation for next release (v1.8.3).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
21 months ago[agent] Fix occasional hanging issue when destroy certain pipelines accepted/tizen_7.0_unified_hotfix accepted/tizen/7.0/unified/20221110.060356 accepted/tizen/7.0/unified/hotfix/20221116.104706 accepted/tizen/unified/20221001.053450 tizen_7.0_m2_release
Yongjoo Ahn [Wed, 28 Sep 2022 06:51:34 +0000 (15:51 +0900)]
[agent] Fix occasional hanging issue when destroy certain pipelines

- When pipeline is destroyed, agent tried to set its state as GST_STATE_NULL.
- However, pipelines which contain tensor_query_* elements make hanging
  when change te state. To resolve this, as a workaround, this commit just unref it.
- After fix this issue in tensor_query / nnstreamer-edge, revive this code.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
21 months ago[agent] Remove lock in freeing pipeline instances
Yongjoo Ahn [Wed, 28 Sep 2022 06:47:49 +0000 (15:47 +0900)]
[agent] Remove lock in freeing pipeline instances

- Remove lock/unlock when freeing pipeline instances

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test] Add more negative testcases for ml-service APIs accepted/tizen/unified/20220928.020841
Yongjoo Ahn [Mon, 26 Sep 2022 11:20:01 +0000 (20:20 +0900)]
[test] Add more negative testcases for ml-service APIs

- Add more negative testcases for ml-service APIs

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Version] prepare release ver 1.8.2
Jaeyun [Mon, 26 Sep 2022 06:41:22 +0000 (15:41 +0900)]
[Version] prepare release ver 1.8.2

Update version info for tizen release (ver 1.8.2).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[test] Add unittest for ml-service
Yongjoo Ahn [Mon, 26 Sep 2022 08:25:31 +0000 (17:25 +0900)]
[test] Add unittest for ml-service

- Add negative TCs for launch and get_state APIs
- Add testcases with explicitly corrupted parameters.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add code for inavlid parameters
Yongjoo Ahn [Mon, 26 Sep 2022 08:23:48 +0000 (17:23 +0900)]
[service] Add code for inavlid parameters

- Add code for handling invalid parameters in ml_service_destroy and
  ml_service_get_pipeline_state.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[agent] Fix return value of dbus method invoc accepted/tizen/unified/20220925.234928 accepted/tizen/unified/20220925.234956 accepted/tizen/unified/20220926.025521
Yongjoo Ahn [Thu, 22 Sep 2022 08:50:44 +0000 (17:50 +0900)]
[agent] Fix return value of dbus method invoc

- Fix return values of method to TRUE cause all the call is success
- This fix recent ASAN issue

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[coverity] Check return value in query_client cb
Yongjoo Ahn [Mon, 19 Sep 2022 08:24:20 +0000 (17:24 +0900)]
[coverity] Check return value in query_client cb

- Check return values in sink callback

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[query] Fix mem leaks in query client
Yongjoo Ahn [Thu, 15 Sep 2022 04:32:24 +0000 (13:32 +0900)]
[query] Fix mem leaks in query client

- Fix mem leaks in query client and its unittests

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[spec] Disable ml-service for tv profile
Yongjoo Ahn [Fri, 16 Sep 2022 04:56:52 +0000 (13:56 +0900)]
[spec] Disable ml-service for tv profile

- Disable ml-service for tv profile

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[debian] Exclude ml-service from debain packaging
Yongjoo Ahn [Thu, 15 Sep 2022 09:11:15 +0000 (18:11 +0900)]
[debian] Exclude ml-service from debain packaging

- Exclude ml-service from debian cause it is not available.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[build] Build/package ml-service when the option is given
Yongjoo Ahn [Thu, 15 Sep 2022 06:12:21 +0000 (15:12 +0900)]
[build] Build/package ml-service when the option is given

- Build/Package ml-service related files only whne the option is given
- Change the meson option name `enable-machine-learning-agent` to
  `enable-ml-service`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Svace] fix res leak accepted/tizen/unified/20220919.012625
Jaeyun [Wed, 14 Sep 2022 11:27:03 +0000 (20:27 +0900)]
[Svace] fix res leak

Fix svace issue, mem leak case.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[test] Add a testcase to test ml_service_query_create
Yongjoo Ahn [Wed, 14 Sep 2022 07:38:37 +0000 (16:38 +0900)]
[test] Add a testcase to test ml_service_query_create

- Test if 'caps' is set or not.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[query] Code clean and fix resource memleak
Yongjoo Ahn [Wed, 14 Sep 2022 07:36:42 +0000 (16:36 +0900)]
[query] Code clean and fix resource memleak

- Return error when the caps is not set by ml_option
- Free allocated variables and remove unused 'caps' member.
- Destroy pipe handle in error case.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add unittest for query client
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:53 +0000 (21:07 +0900)]
[service] Add unittest for query client

- Add simple unittests for using query client APIs.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Implement query client APIs
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:28 +0000 (21:07 +0900)]
[service] Implement query client APIs

- Implement two query client APIs: ml_service_query_create and
  ml_service_query_request
- ml_service_query_create creates a query client handle with given
  ml-option instance. The handle maintains a gstreamer pipeline with
  description:
"appsrc ! other/tensors,... (caps string given with ml-option) ! \
 tensor_query_client ... (props given with ml-option) ! tensor_sink"
- ml_service_query_request takes an input tensor and feed it to the
  pipeline. An output from tensor_sink is copied to given output handle.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add ml-api-service-common to implement common feature
Yongjoo Ahn [Thu, 1 Sep 2022 04:39:09 +0000 (13:39 +0900)]
[service] Add ml-api-service-common to implement common feature

- Implement common feature for server and query client
- Let ml_service_destroy can destroy multiple types of service handle

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Hash key for DB
Yongjoo Ahn [Fri, 2 Sep 2022 01:53:58 +0000 (10:53 +0900)]
[ml-agent] Hash key for DB

- To prevent storing plain keys in DB, hash it.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Add prefix for key in daemon's DB
Yongjoo Ahn [Thu, 1 Sep 2022 08:10:09 +0000 (17:10 +0900)]
[ml-agent] Add prefix for key in daemon's DB

- Add prefix for key when access DB
- This prefix could be set in build time via meson option.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-agent] Add missing header
Yongjoo Ahn [Thu, 8 Sep 2022 05:07:33 +0000 (14:07 +0900)]
[ml-agent] Add missing header

- Add missing header for errno to enable build daemon in ubuntu.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[conf] Update gbs conf to new repos
Yongjoo Ahn [Tue, 13 Sep 2022 05:24:19 +0000 (14:24 +0900)]
[conf] Update gbs conf to new repos

- Update repo urls to the new one.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add API header for query_client service
Yongjoo Ahn [Wed, 31 Aug 2022 12:07:07 +0000 (21:07 +0900)]
[service] Add API header for query_client service

- Add signatures of two APIs for query_client service

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[Build] dependency to dlog accepted/tizen/unified/20220908.124835
Jaeyun [Tue, 6 Sep 2022 09:39:46 +0000 (18:39 +0900)]
[Build] dependency to dlog

Add dlog dependency when building daemon on Tizen release.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[Build] flag to run unittest
Jaeyun [Tue, 6 Sep 2022 05:31:07 +0000 (14:31 +0900)]
[Build] flag to run unittest

Clearly check unittest flag when building tizen rpms.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
22 months ago[service] Add a guide for the "key" when using ml_service_set_pipeline
Yongjoo Ahn [Mon, 5 Sep 2022 08:52:49 +0000 (17:52 +0900)]
[service] Add a guide for the "key" when using ml_service_set_pipeline

- Add a sentence to warn users to keep their name (key) safe.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[svace] Initialize a GstState variable
Yongjoo Ahn [Mon, 5 Sep 2022 04:07:05 +0000 (13:07 +0900)]
[svace] Initialize a GstState variable

- Initialize an uninitialized value.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[svace] Fix leak of GList in `ml_pipeline_switch_get_pad_list`
Yongjoo Ahn [Mon, 5 Sep 2022 04:04:31 +0000 (13:04 +0900)]
[svace] Fix leak of GList in `ml_pipeline_switch_get_pad_list`

- Free allocated `dllist` when allocation of other list is falied.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test] Count each sink for multi model pipeline nnfw unittest
Yongjoo Ahn [Fri, 2 Sep 2022 02:17:48 +0000 (11:17 +0900)]
[test] Count each sink for multi model pipeline nnfw unittest

- Count each sink for multi model pipeline nnfw unittest
  to prevent occasional CI test failure

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[ml-service] Change API name
Yongjoo Ahn [Fri, 26 Aug 2022 06:22:43 +0000 (15:22 +0900)]
[ml-service] Change API name

- Change `ml_service_getstate_pipeline` to `ml_service_get_pipeline_state`
- Change `ml_service_destroy_pipeline` to `ml_service_destroy`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Add document for newly added service APIs
Yongjoo Ahn [Tue, 23 Aug 2022 07:55:36 +0000 (16:55 +0900)]
[service] Add document for newly added service APIs

- Add document for newly added service APIs

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Fix return values and free proxy
Yongjoo Ahn [Tue, 23 Aug 2022 07:53:19 +0000 (16:53 +0900)]
[service] Fix return values and free proxy

- Fix return values and free proxy

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[service] Remove an useless API (ml_service_getdesc_pipeline)
Yongjoo Ahn [Mon, 29 Aug 2022 09:01:03 +0000 (18:01 +0900)]
[service] Remove an useless API (ml_service_getdesc_pipeline)

- Remove API `ml_service_getdesc_pipeline`.
- User can know the pipeline description with existing API `ml_service_get_pipeline`

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
22 months ago[test/service] Set available port number for service API unittest
Yongjoo Ahn [Tue, 30 Aug 2022 11:43:12 +0000 (20:43 +0900)]
[test/service] Set available port number for service API unittest

- Set available port number for service API unittest, rather than
  default value

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Add missing doxygen tag accepted/tizen/unified/20220825.053102 submit/tizen/20220825.022456
Yongjoo Ahn [Mon, 22 Aug 2022 09:09:10 +0000 (18:09 +0900)]
[ml-service] Add missing doxygen tag

- Add missing doxygen tag of an API

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ml-service] Fix session type of ml-service API
Yongjoo Ahn [Mon, 22 Aug 2022 08:57:52 +0000 (17:57 +0900)]
[ml-service] Fix session type of ml-service API

- Set System type for ml-service API.
- If fails to get system bus, try with session type (for unittest)

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
23 months ago[ML Agent] Enable PIE option for Tizen security check
Sangjung Woo [Sat, 20 Aug 2022 05:26:57 +0000 (14:26 +0900)]
[ML Agent] Enable PIE option for Tizen security check

This patch enables the PIE (Position Independent Executable) option to
comply with Tizen security. If this option is not enabled, the daemon
file will be lost its executable permission when making platform image.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>