Woo Chang Kim [Wed, 14 May 2025 09:23:40 +0000 (18:23 +0900)]
Change python to python2
Change-Id: I4163ee98d42143907f835c1dbdc6a25449e089f5
[Mediacontroller] Fixed missing initialization for gcc 14 update
Change-Id: I44b77f72a1201b351cc5a9548d1473e8112ab6a5
[Package] Fix potential defect of nullptr dereference
Coverity - http://10.113.139.115:8081/#/project-view/12080/11248?selectedIssue=
1831559
[Verification] Code compiles without errors.
Change-Id: I174a481aaa539672a9d1fd0ca9ab5f39b6e99882
[Application] Modified critical sections to prevent crash during app closing
[KONA]
DF250203-00477
[Verification] Auto TCT application 100%.
Change-Id: I25b32383481c5dd3ed8e7c1d092ef62c9f2263c9
[Common] Changed CurrentApplication to thread local
CurrentApplication can be accessed by different threads of wrt-services
To protect it from parallel access, it become thread local.
[Verification] Code compiles without errors.
Change-Id: Ic3f20db211a3eb00649b152542deb4a3901ffe7c
Change to c++17 and fix issues
[Verification] Code compiles without errors for armv7l and aarch64
Change-Id: I4cd17f4f2c90f44583ff93a179a35fc0f7b1e934
[Common] Replace access to /proc/xxx/attr/current with cynara API
[Verification] Code compiles without errors.
TCT passrate on RPI4 auto tests - 100% for Tizen Web Device API.
Change-Id: Ifc41d55a310bd3f8f393d23ea189ef10f6c3d630
[Application] Fixed printf format for arch portability
Change-Id: I999480a74fc6be4f04224be0ff73cf6ebc8f1e9d
[Application] Release data pointers as soon as possible
Result and reply callback share user_data and the moment of releasing it
can be difficult to determine.
[Bug] Previous implementation was just holding all pointers through the
application lifetime, but this can be become a problem for applications
working continuously for really long time and starting other
applications with AppControl.
[JIRA] https://jira.sec.samsung.net/browse/TDAF-2090
[Fix] Current implementation makes few assumptions:
1. If Web Application doesn't set reply callback just assume that data
need to be released in result callback.
2. Result callback and reply callback are always called on main
application thread, thus there is no concurrency issues.
3. If reply callback is set, reference count is done to control the data
release and data is released after callee will respond with data.
4. If callee doesn't respond to caller as expected, data handler would
stay as 'pending' in memory and released during application closure.
[Verification] Code compiles without errors.
TCT application passrate 100% (M + A)
Additional verification scenarios with Callee application starting
Callee application, which respond with one of below options:
var data = new tizen.ApplicationControlData(
"test", ["test"]);
// scenario 1 - reply once
reqAppControl.replyResult([data]);
// scenario 2 - call reply twice
reqAppControl.replyResult([data]);
reqAppControl.replyResult([data]);
// scenario 3 - no reply
// scenario 4 - delay
setTimeout(function() {
reqAppControl.replyResult([data]);
}, 10000);
// scenario 5 - instant reply and delayed
reqAppControl.replyResult([data]);
setTimeout(function() {
reqAppControl.replyResult([data]);
}, 5000);
// scenario 6 - two delayed replies
setTimeout(function() {
reqAppControl.replyResult([data]);
}, 5000);
setTimeout(function() {
reqAppControl.replyResult([data]);
}, 10000);
// Failure cases:
// scenario 1 - reply once
reqAppControl.replyFailure();
// scenario 2 - call reply twice
reqAppControl.replyFailure();
reqAppControl.replyFailure();
// scenario 3 - no reply
// scenario 4 - delay
setTimeout(function() {
reqAppControl.replyFailure();
}, 5000);
// scenario 5 - instant reply and delayed
reqAppControl.replyFailure();
setTimeout(function() {
reqAppControl.replyFailure();
}, 5000);
// scenario 6 - two delayed replies
setTimeout(function() {
reqAppControl.replyFailure();
}, 5000);
setTimeout(function() {
reqAppControl.replyFailure();
}, 10000);
Additionally checked scenarios with:
1. Scenario without optional reply callback - data released in result callback
2. Scenario with callee application being closed before receiving reply
callback (instantly after launchAppControl() call) - data released in
destructor and properly handled in callbacks as 'not valid'
3. Scenario without a reply on callee side, caller keeps handle till the
destructor and then just releases memory properly
Change-Id: If04d7fa488f416a2964303d3179d351fadf6f593
[HAM] Fixed deadlock issue
Issue was visible in manual HAM test on emulator:
- HumanActivityMonitorManager_readRecorderData_type_PRESSURE
addRecordedData is called via SensorRecordedDataCb which is called in
ReadRecorderDataImpl function which has mutex locked there. Because of
that there was a deadlock.
Change-Id: I0ef35bb9674b50e9314e037fcf0ceb6feb82e084
Yunhee Seo [Mon, 23 Sep 2024 02:25:21 +0000 (11:25 +0900)]
[Power] Fix variable type to avoid invalidation
[Bug] Double can be represented with some inaccuracy e.g. 30.0 can be
29.999999 which in case of casting to int is casted to 29 instead of 30
as expected.
[Solution] Added std round to proper round double value to closest
inteager instead of cutting of the decimal part of number.
Change-Id: I20e889df9d6a0ff4434fc18b77016287f0bd45c7
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Piotr Kosko [Fri, 5 Jul 2024 08:10:09 +0000 (08:10 +0000)]
Merge "[Iotcon] Prevent concurent access to map" into tizen
[Iotcon] Prevent concurent access to map
Iotcon service seems to call Store/RemoveRemoteResource from different
threads. It was found a cause of crash on TV (KONA
DF240619-01092) this
commit should prevent crash in the future.
[Verification] Iotcon TCT passrate 100% (PontusM)
Change-Id: I741d0d06a4a7918cf05cd590df68e8de9e78bc5f
Daniil Ruban [Tue, 25 Jun 2024 07:07:14 +0000 (09:07 +0200)]
Fill package name with ID if name is empty
- Test 'tct-package-tizen-tests: PackageInformationArraySuccessCallback_onsuccess'
fails on empty name, to fix that if package name is empty package name will be filled with package-id
- For example package with empty name: 'org.tizen.secure-erase'
Change-Id: I2e5f53ba36369c461591226796751f98a399e3f0
Signed-off-by: Daniil Ruban <intx82@gmail.com>
Dongkyun Son [Wed, 19 Jun 2024 13:16:34 +0000 (22:16 +0900)]
systeminfo: handle cpu.arch and fpu.arch
report cpu.arch & fpu.arch in case there is no cpu.arch.* / fpu.arch.*
Change-Id: Ica5936c0be979cf2fad514046892615d52291ed0
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
Mateusz Bieganski [Thu, 13 Jun 2024 14:45:15 +0000 (16:45 +0200)]
systeminfo: add initial risc-v support for cpu.arch
Change-Id: I212a894b66c7217c6b62af1d12af70a1dfc41611
Signed-off-by: Mateusz Bieganski <m.bieganski@samsung.com>
wchang kim [Wed, 5 Jun 2024 07:24:46 +0000 (16:24 +0900)]
Fixed the build error for gcc-14
Change-Id: I230b1af68ea06d4371d676869525e1e91caab156
[package] Fixed potential dereference of nullptr
[Verification] Compiles without error.
Change-Id: Ic3af3b88a53077bacb7cbe4abfc17038910b4557
[Content] Deprecate Playlist
[ACR] https://jira.sec.samsung.net/browse/TWDAPI-295
[Verification] Code compiles without errors.
Change-Id: Iaff91998ee3cad1b128f55494087333e744bd59d
[Content] Fixed the reconfigurable issue
[Verification] Code compiles. Problem with find method does not appear
anymore.
Change-Id: I577ea7fd30fcb8ef7f34d1f66a2be7b5d5a4048c
[Content] Add deprecation to some not frequently used members
[ACR] https://jira.sec.samsung.net/browse/TWDAPI-294
[Verification] Code compiles without errors.
Change-Id: I91ebbeb53a70d27fb46e7cd19ce60f36ee2d352d
[Content] Storage type usage removed
[ACR] https://jira.sec.samsung.net/browse/TWDAPI-289
[Verification] TCT passrate without change.
Change-Id: Ic01826cf3d2f2d4761847e2806057903d4a34aa8
[Alarm/BT/HAM/MediaCon/SysInfo] Fix Coverity issues
Issues:
1739921,
1741285,
1745119,
1746302,
1740124,
1740531,
1745380
[Verification] Auto TCT passed for modules Alarm, Bluetooth,
HumanactivityMonitor, Mediacontroller and Systeminfo
Change-Id: I05b09590936ceba63273bf92ad53577bb2a368fd
wchang kim [Tue, 26 Dec 2023 12:35:59 +0000 (21:35 +0900)]
Fixed the build error of cordova and libteec for riscv64
Change-Id: I3f8804ca61294fec507bba72a549475dcbf5f204
[Archive] Fixed permission handling for windows-zipped files
[Issue] When having files with added P attribute on windows, then zipped
and unzipped on tizen using Web API, files have invalid access rights.
Reproduction:
1. create file on windows
2. add P attribute: attrib -a +p test_file.txt
3. zip file with 7-zip
4. copy to tizen device and unzip with webapi:
function errorCallback(error) {console.log(error);}
function successCallback() {console.log("done");}
function progressCallback(opId, val, name) {
console.log(
"extracting operation (: " + opId + ") is in progress (" + (val * 100).toFixed(1) + "%)");
}
function openSuccess(archive) {
archive.extractAll("downloads", successCallback, errorCallback, progressCallback);
}
tizen.archive.open("downloads/test_kona.zip", "r", openSuccess);
5. check file permission:
------x--- 1 owner priv_mediastorage User::App::Shared 9 Oct 31 14:07 testfile.txt
[Verification] With this commit, above scenario ends with proper 755
permissions (for windows files), and recreated files permissions if
points 1-3 are done on ubuntu.
TCT passrate is 100%.
Change-Id: I8d6e3de036b39f5180b4773eaee5b710b0def9be
[Common] Changed configuration for common profile build
Enabled Application and Alarm features for common build also.
[Verification] Alarm and Application 100% pass with common profile
installed on RPI4
Change-Id: I4f1e992d123e350ba42acc6b9aac38a8f27a82be
[Messaging] Deprecated whole module
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-292
Change-Id: I118f257d8b922cf8d0e67c8f067b025a416d8ef8
[Tools] Added stdout protection during dlopen
[Issue] During dlopen libraries loads other libraries. If any library in
the chain generates some output to stdout, it corrupts the json file.
To prevent this problem, we add stdout redirect during dlopen operation.
[Verification] Code compiles without errors; plugins.json file is
properly generated.
Change-Id: Ic46e5f1b8d90b2de0ffe1065f2fffaa75127de19
Piotr Kosko [Wed, 16 Aug 2023 12:03:18 +0000 (12:03 +0000)]
Merge "[Common] Fixing Coverity issues: AUTO_CAUSES_COPY" into tizen
Yelin Jeong [Fri, 28 Jul 2023 02:25:13 +0000 (11:25 +0900)]
[ML] add condition for changing default value in dimension array
To remove unnecessary initiazlied value 1 in dimension array,
ml-api will save '1' only if the user explicitly defined it.
So, some conditions may need to be changed.
Change-Id: Iafb626d4c7b2322cd7e5e8d42525fc194a7b3456
Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
Build fixes for new toolchain
[Verification] Code compiles without errors.
Change-Id: I90dd40984fddf8cbf5d5e16883b63ad550cabb01
p.kosko@samsung.com [Tue, 18 Jul 2023 12:13:05 +0000 (14:13 +0200)]
Fixed listDirectory()
[KONA]
DF230714-00592
Issue: names returned via API can be invalid.
1. create many files in dir, 1-100.txt files
2. tizen.filesystem.listDirectory("documents", function(files) {f = files; console.log(files) }, function(e) { console.log(e) } )
issued list contains empty names/names with strange characters.
This fixes above problems.
[Verification] With above code, problem doesn't occur.
TCT passrate 100%.
Change-Id: Ief9ec91b0a130d789c8777423f51dfa6b2f6de9d
Krzysztof Jackiewicz [Mon, 19 Jun 2023 07:34:16 +0000 (09:34 +0200)]
[Keymanager] Fix alias tokenizing
There are 2 problems with key-manager alias tokenizing code:
1. strtok_r() used for tokenizing affects internal/opaque key-manager's
structure ckmc_alias_info_s by modifying the string pointed by the
pointer returned from ckmc_alias_info_get_alias(). As a result, the
following call to ckmc_alias_info_is_password_protected(), that uses
this structure, fails.
2. strtok_r() splits the string when *any* of characters passed in
'delim' argument is found. However, the ckmc_owner_id_separator is
in fact a string, not a set of delimiting characters. It's current
value is ' ' which happens to work well with strtok_r() but this is
also a part of internal key-manager's code and may be changed in
future.
Fix above by locating a complete ckmc_owner_id_separator substring and
tokenizing it without modifying the original string.
Change-Id: I86a4dcbb36dad98219acf32a69d9bbb4164c83b4
[Systeminfo] Uptime feature added
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-291
[Verification] Code compiles without errors.
Checked in chrome console. Code returns seconds since uptime.
> tizen.systeminfo.getDeviceUptime()
2567
Change-Id: I968ee8e19cdb07f031d543161fcf24f62d9047fd
Sangjung Woo [Fri, 7 Apr 2023 08:51:01 +0000 (17:51 +0900)]
[ML] Fix the value of ML_TENSOR_RANK_LIMIT
To support the higher rank of the ML model, the ML_TENSOR_RANK_LIMIT
of the ML API was changed from 4 to 16. However, the webapi-plugins
assume that ML_TENSOR_RANK_LIMIT is 4 and it causes the build break issue.
This patch fixes this issue and update related test cases.
Change-Id: I05ab7fa0a5ba28476f38170d9f9c4e7396d35981
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Signed-off-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
DongHyun Song [Tue, 27 Sep 2022 05:42:27 +0000 (14:42 +0900)]
[Common] Get package, application ID from GetRuntimeVariable
[Verification] Code compiles without errors
Change-Id: Id3f9d8ca1db07c3615a7741a8445209171425ac6
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
[Archive][Exif] Fixed svace issues
Change-Id: I1ce5d268663af59edfe6c95dfeaba4511d287da3
[filesystem][archive][messaging] Fixing SVACE issues
Change-Id: If87b2063207dd3773587ca73b1c6410f26b7b926
[PPM] Deprecate whole module
PPM module was required by mobile and wearable profiles, now it is not
needed.
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-290
[Verification] Code compiles witout errors.
Deprecation warnings checked in chrome console.
Change-Id: Ice28c351ac5f40cf835fe89dad1ddbf6d0a184db
JinWang An [Thu, 2 Feb 2023 16:41:46 +0000 (01:41 +0900)]
Fix type mismatch in LoggerD arg between %u and int
Change-Id: I926dd4eee7e93f69982eda37375513bd44a83da9
Signed-off-by: JinWang An <jinwang.an@samsung.com>
Piotr Kosko [Tue, 31 Jan 2023 07:45:29 +0000 (07:45 +0000)]
Merge "[ML][Single] Fix the crash issue in SingleShot class" into tizen
Sangjung Woo [Thu, 26 Jan 2023 07:46:02 +0000 (16:46 +0900)]
[ML][Single] Fix the crash issue in SingleShot class
ml_single_close() can be called in both Close() method and destructor of
SingleShot class. If the handle is invalid, calling ml_single_close()
can cause the segmentation fault issue. This patch checks whether the
handle is valid or not so it fixes the potential bug.
Change-Id: I0ab94cae99f53d274a091acb3a21403f42664439
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Dariusz Michaluk [Thu, 26 Jan 2023 10:48:56 +0000 (11:48 +0100)]
[PPM] Ignore deprecated-declarations warning
All PPM APIs are deprecated since Tizen 7.5
Change-Id: If08833c1157616d266b2c368b00e8342dfe0934b
[Sound] Deprecation of 'activation' concept and adding 'running' concept
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-288
[Verification] TCT passrate 100%
Change-Id: Icae15c2e48f8157fb490925143fb16b25b0e966e
[Systeminfo] Removed caching a wifi signal level
Registering a wifi listener on boot can cause a performance issue on
application start even the application will never use wifi in its
lifetime.
I removed registering signal strength listener to avoid this problem,
instead the signal strength will be gathered from native API only when
needed (instead of using a cached value).
[Verification] TCT systeminfo 100% pass
I've checked performance of
tizen.systeminfo.getPropertyValue("WIFI_NETWORK", (s) => console.log(s.signalStrength), (s) => console.log(s))
the difference is ~2-4ms.
Change-Id: Iabe4101e5871f426526cf56c7b6fc3f69e59b159
[Common] Fixed typo
[Verification] Code compiles without errors
Change-Id: I97f5aa9394590b5fa963caef8811ebfea16670fd
DongHyun Song [Wed, 14 Dec 2022 07:04:10 +0000 (16:04 +0900)]
Ignore TaskQueue::DeleteJobs when worker terminated
From Tizen 7.0, tizen.ml is enabled in web worker. Because 'tizen'
and 'xwalk' extensions are loaded on web worker. Global TaskQueue
can be truncated at 'xwalk' instance is deleted.
This singleton TaskQueue should be truncated when main JS context
is destroyed, not by web worker.
Change-Id: I078a7217622d107799a9a47786d1680db5bed5db
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
[Content] Removed deprecated storageType API usage
This commit removes all platform code related to storageType and
provides only a hardcoded 'storageType_NOT_SUPPORTED' value for easier
analysis of possible issues after removal.
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-289
[Verification]
2 failing content TCTs which uses removed API, need to be
removedi/modified not to check storage type:
error:
invalid enum value value "storageType_NOT_SUPPORTED" not in array ["INTERNAL", "EXTERNAL"]
- ContentChangeCallback_oncontentdiradded
- ContentChangeCallback_oncontentdirupdated
1 deprecated TCT need to be removed:
- ContentDirectory_storageType_attribute
Change-Id: I0cf883097ce47c342949346a3fffca7f525faee8
[Commmon] Fixed passing a pkgid
[Verification] Works well with wrt service application.
Change-Id: Ib1cebe4d57c7fc1962b0a6f11baca95fbb979834
[sound] Add internal header for supporting removed APIs
SOUND_DEVICE_STATE_DEPRECATED_ACTIVATED_MASK was removed from public
API, thus we need to add internal header to resolve build break.
[Verification] Code compiles without errors.
Change-Id: I4b0007b6cd4635cacccbde25f1d974f213309d0d
[Download] Fixed download initialization
When many downloads are taking place one after another it was possible
that uninitialized memory used for state value has a 5,6,7 status, which
caused that web api interpreted it as not valid state change, when the
'DOWNLOADING' state comes. Now this should not occur as the state is
initialized before starting a download.
Change-Id: I8c0ed0d375e512c1dcc17255f2387df70f3ddcb3
[Common][Package] Avoid recalling app_info_create() for consecutive calls
app_info_create occasionally when the device is freshly reboot takes
much time to gather data (over 1 second), which causes a serious delay
when the function is called several times in the row without caching the
result.
This modification makes a single call of app_info_create() at first try
and then only return previously fetched value.
[Verification] Code compiles without errors.
TCT application, package, deprecated - passrate didn't change.
Change-Id: Ifc989d5eb0f7435f1a6451613d289d6d3851e979
[Filesystem] Fixed invalid unregistration of StateListener
Issue occurred when running filesystem manual TCTs, first test passed,
the second test didn't pass because static FilesystemManager didn't
unregister the listener properly.
[Verification]
Filesystem manual TCT passed.
Filesystem auto 100% pass.
Change-Id: I185f541b15c146c3b62fb1dbfd5df48c0a9dd5e4
[HAM] Restore missing helper functions
Restored functions accidentaly removed in
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/277641/2/src/humanactivitymonitor/humanactivitymonitor_api.js
Change-Id: I45420341ff3907442ad8d7fa82eb43ded7756fef
[HAM] Process API removal change
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-287
[Verification]
Code compiles without errors.
Removed APIs throw NotSupportedError exception on use.
Change-Id: Ic05212ea5656d0fa4a16a2e72ac9ca913e010bed
[version] 2.92
Change-Id: I8ccde7efee0df2044a02eae920f3bb1ea88eeecc
Piotr Kosko [Fri, 3 Jun 2022 05:25:58 +0000 (05:25 +0000)]
Merge "[Content] Remove deprecated native functions, break backward compatibility" into tizen
Marcin Bialek [Thu, 2 Jun 2022 10:40:24 +0000 (12:40 +0200)]
[Content] Remove deprecated native functions, break backward compatibility
The following properties of Content are marked as readonly since Tizen 5.5:
- DOMString name
- DOMString? description
- unsigned long rating
- SimpleCoordinates? geolocation
- ImageContentOrientation orientation
They were still writeable, if an application was compiled for version
below 5.5. This commit breaks the backward compatibility and writing
is not possible for all versions.
The following deprecated native functions have been removed:
- image_meta_set_orientation
- image_meta_update_to_db
- media_info_set_description
- media_info_set_longitude
- media_info_set_latitude
- media_info_set_rating
[Related ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-203
[Verification] Code compiles. TCT tests for content module pass.
Change-Id: I7bd777998bcbc7cfe92794aedbbd8c55058fbac2
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
Piotr Kosko [Fri, 6 Nov 2020 08:44:38 +0000 (09:44 +0100)]
[NBS] partial fix for accessing network IPv6
Change-Id: Ief4f4d38f43aac6667d20e24a3c50d58c844ffe8
Piotr Kosko [Tue, 10 May 2022 07:13:25 +0000 (07:13 +0000)]
Merge "[ML][Train] Enable module for public TV images" into tizen
[ML][Train] Enable module for public TV images
Change-Id: If26681aaa4ede05a8c713dd146cf952842286b1a
Piotr Kosko [Mon, 9 May 2022 06:46:04 +0000 (06:46 +0000)]
Merge "[ML][Train] Fixes for error types of compile() and run()" into tizen
[ML][Train] Fixes for error types of compile() and run()
Fixed error handling for compile() and run() - all errors were casted to
AbortError. After fix, errors reported by native API are casted to
proper Web type if possible.
Added proper handling for null/undefined values passed as options.
[Verification]
modelFile = "/home/owner/media/Documents/test_model.ini"
var Model = tizen.ml.trainer.createModel(modelFile);
Model.compile({loss:"test"}) // InvalidValuesError
// Model.compile({loss:true}) // InvalidValuesError
// Model.compile(null) // success
// Model.compile() // success
sCb = (s) => console.log(s)
eCb = (e) => console.log(e)
Model.run({save_path:"not_a_virutal_path"}, sCb, eCb);
//InvalidValuesError via eCb
// Model.run({save_path:"/not_a_real_path"}, sCb, eCb);
// InvalidValuesError via eCb
// Model.run({epochs: "aaaa"}, sCb, eCb)
// InvalidValuesError via eCb
// Model.run({epochs: true}, sCb, eCb)
// InvalidValuesError via eCb
// Model.run(null, sCb, eCb) // success
// Model.run("abcd", sCb, eCb) // TypeMismatchError
Change-Id: Ibb59f7720048b499ce0d576666fad2d5764637e5
Marcin Bialek [Wed, 4 May 2022 10:04:34 +0000 (12:04 +0200)]
[Content] Replace media_info_set_display_name function with media_info_move_to_db
media_info_set_display_name function is going to be removed and has to be replaced.
[Verification] Code compiles. TCT tests for content module pass. Changes were also tested manually.
Change-Id: Ia623409bd22836aff2089b5811e088f50c575810
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
Marcin Bialek [Sat, 23 Apr 2022 14:11:51 +0000 (16:11 +0200)]
[ML][Train] Unify thrown exceptions and some fixes.
All dispose() methods threw NotFoundError if a model/layer/optimizer/dataset did not exist but other methods threw AbortError in the same situation. Fixed some misspelled exception names as well.
[Verification] Code compiles. The modified methods were manually tested for thrown exceptions.
Change-Id: I9c06ce22dab5a28a6cf268712f5aed83d08dc27e
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
Marcin Bialek [Thu, 21 Apr 2022 10:23:13 +0000 (12:23 +0200)]
[Messageport] Fix return value from requestLocalMessagePort function
[Verification] Code compiles. 100% pass rate for tct-messageport-tizen-tests on TV.
Change-Id: Iab0ed6edb8f0eb9c45319135a4f85a79e3ca3a41
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
Marcin Bialek [Thu, 31 Mar 2022 10:38:47 +0000 (12:38 +0200)]
[Notification] Fix setting nullable properties.
Some nullable properties could not be set to null.
[Verification] Code compiles. Fixes were tested on an emulator as well.
Change-Id: Ifb34d962909369c9f87b5e8958a814b2e5dc50c9
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
[ML][Train] Integrated createModel methods and fixes few issues
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285
[Verification] Code compiles.
Checked in chrome console. New enum values works and createModel method
accepts configFile as param.
Change-Id: I41aceb2aca5cf345628f5e6c083e0c57e99f0a03
[Messageport] Optimization of ports creation
[Verification] Code compiles without errors.
Checked in chrome console, requesting same port name reuses previously
constructed object.
TCT passrate is 100%.
Change-Id: Icd8c398dbbba2e7df0c767a8af0d339e06c1bba1
[Common] Changed method of deviced listener implementation
To prevent crash in multithreaded model of wrt-services, there is a need
to use device_changed_callback_ as a thread local variable.
[Verification] Code compiles without errors.
Change-Id: Ifba2cef597e6244ab9c071b10c870b942b500946
DongHyun Song [Mon, 14 Mar 2022 02:07:13 +0000 (02:07 +0000)]
Merge "Revert "Use thread_local (instead of static) storage duration due to thread safety issue."" into tizen
DongHyun Song [Mon, 14 Mar 2022 02:06:39 +0000 (02:06 +0000)]
Revert "Use thread_local (instead of static) storage duration due to thread safety issue."
This reverts commit
122bae587fb3d4d1879f567baa97b72bdd6a1a5a.
Change-Id: Ic2ff664d602044b400c48063285039ded3472af9
[ML] Disable ML Trainer for TV build profile
[verification] Compilation succeeds for mobile and tv profile.
Mobile profile includes all C++ implementation dependant of nntrainer.
TV profile build does not include any C++ implementation of
tizen.ml.trainer methods.
Tested in chrome console that for Mobile - tizen.ml.trainer is available
and working properly. For TV feature is disabled (doesn't work), but
there are no crashes.
Change-Id: I55dd846d7ba8303a0422deabc9aa2b6dbfe27612
Piotr Kosko [Fri, 11 Mar 2022 06:27:29 +0000 (06:27 +0000)]
Merge "[ML] TODO resolving/removal" into tizen
DongHyun Song [Tue, 8 Mar 2022 08:35:55 +0000 (17:35 +0900)]
Add 'self' as global scope for web worker
In web worker world, 'self' is defined global scope object.
This change is necessary to apply tizen webapis on web worker for
specific purpose. (i.e. tizen.ml)
Change-Id: Ie9602ea4f492589dad2c87e3c0bd8e2602278c02
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Marcin Kaminski [Wed, 2 Mar 2022 18:52:04 +0000 (19:52 +0100)]
[ML] TODO resolving/removal
Changes:
- constants sorted in ml_instance.cc
- stubs for createGeneratorDataset() removed from all levels
- obsolete try-catch removed
Change-Id: Ie50592ae1c6af6c9e3a8cfddc1c93dd61bc26da2
Piotr Kosko [Wed, 2 Mar 2022 12:13:14 +0000 (12:13 +0000)]
Merge "[Notification] Fix memory leak." into tizen
Marcin Bialek [Wed, 2 Mar 2022 11:58:36 +0000 (12:58 +0100)]
[Notification] Fix memory leak.
[Verification] Code compiles.
Change-Id: I9e75cfd1d91021eb7a8bb074bcd0505c8002997b
Marcin Kaminski [Wed, 23 Feb 2022 19:32:50 +0000 (20:32 +0100)]
[ML][Training] Fixing error handling
Changes:
- proper error returning at JS level
- additional check and proper error returned
on recompilation trial
Change-Id: If209e316553c94acd0a83decfb843b26a07be592
[ML] Train - added load() method implementation
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285
[Verification] Code compiles without errors.
Verified in chrome console - load() works.
var m2 = tizen.ml.trainer.createModel()
m2.load("documents/ttt_INI_WITH_BIN.ini", "FORMAT_INI_WITH_BIN")
Change-Id: Ic9d248790814dee47f5d0b712fe15e59ee8b93b9
Piotr Kosko [Thu, 24 Feb 2022 07:43:32 +0000 (07:43 +0000)]
Merge "[ML][Training] Layer name handling" into tizen
[ML] Fix test break for MLSingleshot
[Verification] Code compiles.
TCT passrate:
* ml-tizen 100%
* mlpipeline-tizen 100%
* mlsingleshot-tizen 100%
Change-Id: Ia2ebef7a46600537946f308be5375e274f40df46
Marcin Kaminski [Mon, 21 Feb 2022 19:54:43 +0000 (20:54 +0100)]
[ML][Training] Layer name handling
Changes:
- proper handling of Layer.name attribute at JS level
with name storing at C++ level
Change-Id: I68782fd386bba3b709c481b9a5ac69f04c7287e0
[notification] Fixed log format
[Verification] Code compiles for aarch64
Change-Id: Id93e303e118af2e3153d84c253684330d463185a
[ML] Fix Coverity issues for fields initialization
[Verification] Code compiles without errors.
Change-Id: I37afb023e1844943b0a844594181c6bab8223678
Marcin Kaminski [Fri, 18 Feb 2022 19:20:32 +0000 (20:20 +0100)]
[ML][Train] Remove denial of Model modification
Changes:
- removed check and error reporting for setting new dataset
after Model has been compiled and trained as it should be possible
to train with new data.
Change-Id: I144b45979b83ccaa101cf356a393271fdc352a90
[version] 2.91
Change-Id: I94eaeb841518c62bedcd9ef2bc701502fb714c27
Piotr Kosko [Mon, 21 Feb 2022 11:37:42 +0000 (11:37 +0000)]
Merge "[ML] Train - added a test method for trained model" into tizen
[ML] Train - fix for virtual root
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285
[Verification] Code compiles.
Checked in chrome console - save_path in run options now supports virtual roots.
Change-Id: I77d67875a73441d1638ffbeb99366ad6a7301957
[ML][Train] Fix of createModelWithConfiguration
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285
Change-Id: I1483b69310f2bd942c2c5b4de35a903c1ee04549
[ML] Train - added a test method for trained model
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285
[Verification] Code compiles without errors.
Verification method is available in JS console.
var trainsetFile = "documents/trainingSet.dat";
var validsetFile = "documents/valSet.dat";
// TODO should support virtual roots
var outputFile = "/home/owner/media/Documents/webapi_tizen_model.bin"
var m = tizen.ml.trainer.createModel()
var l1 = tizen.ml.trainer.createLayer("LAYER_IN")
l1.setProperty("input_shape", "1:1:62720")
l1.setProperty("normalization", "true")
l1.setProperty("name", "inputlayer")
m.addLayer(l1)
var l2 = tizen.ml.trainer.createLayer("LAYER_FC")
l2.setProperty("unit", "10")
l2.setProperty("activation", "softmax")
l2.setProperty("bias_initializer", "zeros")
l2.setProperty("weight_regularizer", "l2norm")
l2.setProperty("weight_regularizer_constant", "0.005")
l2.setProperty("weight_initializer", "xavier_uniform")
l2.setProperty("name", "fc1")
l2.setProperty("input_layers", "inputlayer")
m.addLayer(l2)
var opt = tizen.ml.trainer.createOptimizer("OPTIMIZER_ADAM")
opt.setProperty("learning_rate", "0.0001")
opt.setProperty("decay_rate", "0.96")
opt.setProperty("decay_steps", "1000")
opt.setProperty("beta1", "0.002")
opt.setProperty("beta2", "0.001")
opt.setProperty("epsilon", "1e-7")
m.setOptimizer(opt);
var dataset = tizen.ml.trainer.createFileDataset(trainsetFile, validsetFile, /*no test file*/);
dataset.setProperty("buffer_size", "100", "MODE_TRAIN");
dataset.setProperty("buffer_size", "100", "MODE_VALID");
m.setDataset(dataset);
var compileOpts = {
loss: "cross", batch_size: "16"
}
m.compile(compileOpts);
var runOpts = {
epochs: "2", save_path: outputFile
}
m.run(runOpts, (s) => {
console.log("success");
console.log("Test result: " + m._checkMetrics(2.163000, 2.267410, 16.666700));
}, (e) => console.log("error " + JSON.stringify(e)));
Change-Id: I4760fe341f58f84c985c6e4e4b609bafe36fb4be
Marcin Kaminski [Fri, 28 Jan 2022 20:18:41 +0000 (21:18 +0100)]
[ML][Training] Thread-safe locks
Changes:
- mutex added to model object to lock single model
when compiling or in training
- mutex added for synchronizing models map operations
between dispose() and run()
Change-Id: I56f80d5beb9f0d93f346d64849bea5aa583e506d
Piotr Kosko [Mon, 14 Feb 2022 07:34:18 +0000 (07:34 +0000)]
Merge "[Notification] Add API for using buttons and a text input in a notification and getting block state" into tizen
[version] 2.90
Change-Id: I844ced5d5ce7a857201a7019038448c30aafa695
Piotr Kosko [Thu, 10 Feb 2022 08:32:14 +0000 (08:32 +0000)]
Merge changes Ia619a69d,Id35d552c,Ib71d21b2,I2f45bb44 into tizen
* changes:
[ML][Training] Dataset.setProperty() refactoring
[ML][Training] Object destruction implementation
[ML][Training] Model saving to file
[ML][Training] Model implementation
Marcin Kaminski [Fri, 21 Jan 2022 18:44:41 +0000 (19:44 +0100)]
[ML][Training] Dataset.setProperty() refactoring
Changes:
- enum DatasetMode added
- Dataset.setProperty() expanded with 'mode' param to match C API design
Change-Id: Ia619a69d6367c2624fff9d402e6a3505ce33f14b
Marcin Kaminski [Sat, 15 Jan 2022 18:09:31 +0000 (19:09 +0100)]
[ML][Training] Object destruction implementation
Changes:
- dispose() function added to Model, Layer, Dataset and Optimizer
- C++/C layer for dispose implemented
- additional wrapper objects for storing state/relations between objects
Change-Id: Id35d552c5bdf4840a176eeb85ad1bc4114c01ccb
Marcin Kaminski [Sat, 15 Jan 2022 13:00:35 +0000 (14:00 +0100)]
[ML][Training] Model saving to file
Changes:
- implementation of Model.saveToFile() method for saving model
on storage for re-use
- new enum for model saving selection
- minor change in dataset creation (path prefix removal)
Change-Id: Ib71d21b2d4a61e2ff2ed8e8b4f983acaeaa02408
[Archive] Support for global paths in tizen.archive methods
[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-286
[TCT] 5 failures - TCT need to be updated.
Change-Id: Ibdbf1c48468bb0648c2dd107cc2f42b506fe73df