namespace {
const int kCustomFilterSuccess = 0;
const int kNoId = -1;
+
const std::string kAsync = "async";
const std::string kBOOLEAN = "BOOLEAN";
const std::string kBuffer = "buffer";
const std::string kCallbackId = "callbackId";
+const std::string kConfigPath = "configPath";
+const std::string kCustomRequirement = "customRequirement";
const std::string kDataId = "dataId";
+const std::string kDatasetId = "datasetId";
const std::string kDefinition = "definition";
const std::string kDimensions = "dimensions";
const std::string kFwType = "fwType";
const std::string kHw = "hw";
const std::string kHwType = "hwType";
const std::string kId = "id";
+const std::string kInTensorsInfo = "inTensorsInfo";
const std::string kIndex = "index";
const std::string kInputTensorsInfoId = "inputTensorsInfoId";
-const std::string kInTensorsInfo = "inTensorsInfo";
const std::string kIsDynamicMode = "isDynamicMode";
+const std::string kLayerId = "layerId";
+const std::string kLevel = "level";
const std::string kListenerName = "listenerName";
const std::string kLocation = "location";
+const std::string kMode = "mode";
const std::string kModelPath = "modelPath";
-const std::string kConfigPath = "configPath";
const std::string kName = "name";
const std::string kNnfw = "nnfw";
-const std::string kCustomRequirement = "customRequirement";
const std::string kNodeName = "nodeName";
const std::string kOpen = "open";
+const std::string kOptimizerId = "optimizerId";
+const std::string kOptions = "options";
const std::string kOtherId = "otherId";
-const std::string kOutputTensorsInfoId = "outputTensorsInfoId";
const std::string kOutTensorsInfo = "outTensorsInfo";
+const std::string kOutputTensorsInfoId = "outputTensorsInfoId";
const std::string kPadName = "padName";
const std::string kPipelineStateChangeListenerName = "listenerName";
const std::string kProperty = "property";
const std::string kRequestId = "requestId";
+const std::string kSTRING = "STRING";
+const std::string kSaveFormat = "saveFormat";
+const std::string kSavePath = "savePath";
const std::string kShape = "shape";
const std::string kSize = "size";
const std::string kStatus = "status";
-const std::string kSTRING = "STRING";
+const std::string kSummary = "summary";
const std::string kTensorsDataId = "tensorsDataId";
const std::string kTensorsInfoId = "tensorsInfoId";
+const std::string kTest = "test";
const std::string kTimeout = "timeout";
+const std::string kTrain = "train";
const std::string kType = "type";
+const std::string kValid = "valid";
const std::string kValue = "value";
-// TODO: sort const
-const std::string kTrain = "train";
-const std::string kValid = "valid";
-const std::string kTest = "test";
-const std::string kOptions = "options";
-const std::string kLayerId = "layerId";
-const std::string kDatasetId = "datasetId";
-const std::string kOptimizerId = "optimizerId";
-const std::string kLevel = "level";
-const std::string kSummary = "summary";
-const std::string kSavePath = "savePath";
-const std::string kSaveFormat = "saveFormat";
-const std::string kMode = "mode";
} // namespace
using namespace common;
REGISTER_METHOD(MLTrainerModelSetDataset);
REGISTER_METHOD(MLTrainerModelSetOptimizer);
REGISTER_METHOD(MLTrainerModelDispose);
- REGISTER_METHOD(MLTrainerDatasetCreateGenerator);
REGISTER_METHOD(MLTrainerDatasetCreateFromFile);
REGISTER_METHOD(MLTrainerDatasetSetProperty);
REGISTER_METHOD(MLTrainerDatasetDispose);
auto async_logic = [this, id, options](decltype(out) out) {
PlatformResult result;
- try {
- result = trainer_manager_.ModelRun(id, options);
- } catch (...) { // MK-TODO verify why this exception occurs
- LoggerE("Unhandled and unexpected exception!!");
- ReportError(result, &out);
- }
+ result = trainer_manager_.ModelRun(id, options);
if (!result) {
ReportError(result, &out);
ReportSuccess(out);
}
-void MlInstance::MLTrainerDatasetCreateGenerator(const picojson::value& args,
- picojson::object& out) {
- ScopeLogger("args: %s", args.serialize().c_str());
-}
-
void MlInstance::MLTrainerDatasetCreateFromFile(const picojson::value& args,
picojson::object& out) {
ScopeLogger("args: %s", args.serialize().c_str());