[ML] Train - fix for virtual root 58/271358/1
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Fri, 18 Feb 2022 08:20:19 +0000 (09:20 +0100)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Fri, 18 Feb 2022 08:20:22 +0000 (09:20 +0100)
[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

src/ml/js/ml_trainer.js

index 4c3a841..27d5d2b 100755 (executable)
@@ -332,7 +332,8 @@ function ValidateRunOptions(options) {
         args.epochs = options.epochs;
     }
     if (options.hasOwnProperty('save_path')) {
-        args.save_path = options.save_path;
+        // produce a global path without "file://" prefix
+        args.save_path = tizen.filesystem.toURI(options.save_path).substring("file://".length);
     }
     return args;
 }