summaryrefslogtreecommitdiff
path: root/RhSolutions.ML.Lib
diff options
context:
space:
mode:
authorSerghei Cebotari <serghei@cebotari.ru>2023-12-29 00:05:17 +0300
committerSerghei Cebotari <serghei@cebotari.ru>2023-12-29 00:05:17 +0300
commit3be0df94c032b945af803d5056fb01df7af417f3 (patch)
tree32f163fffa86afd02df3c93fe62a041038513464 /RhSolutions.ML.Lib
parenta3cc89ce049a09aeebf068e6013a7e9b142e695f (diff)
Remove RhSolutions.Console
Diffstat (limited to 'RhSolutions.ML.Lib')
-rw-r--r--RhSolutions.ML.Lib/RhSolutionsMLBuilder.cs7
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"));
}
}