[ML][Train] Remove denial of Model modification 97/271397/3
authorMarcin Kaminski <marcin.ka@partner.samsung.com>
Fri, 18 Feb 2022 19:20:32 +0000 (20:20 +0100)
committerMarcin Kaminski <marcin.ka@partner.samsung.com>
Mon, 21 Feb 2022 18:37:36 +0000 (18:37 +0000)
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

src/ml/ml_trainer_manager.cc

index 8f87bcc..3070358 100644 (file)
@@ -313,13 +313,6 @@ PlatformResult TrainerManager::ModelSetDataset(int id, int datasetId) {
 
   auto& dataset = datasets_[datasetId];
 
-  if (model->isCompiled()) {
-    LoggerE("Modification of compiled model");
-    model->instanceLock.unlock();
-    return PlatformResult(ErrorCode::INVALID_STATE_ERR,
-                          "Modification of compiled model not allowed");
-  }
-
   int ret_val =
       ml_train_model_set_dataset(model->getNative(), dataset->getNative());
   if (ret_val != ML_ERROR_NONE) {