diff options
author | Serghei Cebotari <serghei@cebotari.ru> | 2023-12-29 00:05:17 +0300 |
---|---|---|
committer | Serghei Cebotari <serghei@cebotari.ru> | 2023-12-29 00:05:17 +0300 |
commit | 3be0df94c032b945af803d5056fb01df7af417f3 (patch) | |
tree | 32f163fffa86afd02df3c93fe62a041038513464 /RhSolutions.ML.Lib | |
parent | a3cc89ce049a09aeebf068e6013a7e9b142e695f (diff) |
Remove RhSolutions.Console
Diffstat (limited to 'RhSolutions.ML.Lib')
-rw-r--r-- | RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs b/RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs index be2e2a6..7030cf5 100644 --- a/RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs +++ b/RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs @@ -36,7 +36,12 @@ public class RhSolutionsMLBuilder private static void SaveModelAsFile(MLContext mlContext, DataViewSchema trainingDataViewSchema, ITransformer model) { + string path = Path.Combine(_appPath, "..", "..", "..", "..", "Models"); + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } mlContext.Model.Save(model, trainingDataViewSchema, - Path.Combine(_appPath, "..", "..", "..", "..", "Models", "model.zip")); + Path.Combine(path, "model.zip")); } } |