Skip to content

Commit

Permalink
Model de/serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockdain committed Feb 14, 2023
1 parent 8bdbc99 commit 82eb19b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>ru.asergeenko</groupId>
<artifactId>Alink Sentiment Analysis</artifactId>
<artifactId>AlinkSentiment</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/ru/asergeenko/flink/ml/iris/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public static void main(String[] args) throws Exception {
);

PipelineModel model = pipeline.fit(trainingSet);
model.transform(validationSet.firstN(100))
model.save("src/main/resources/model");
PipelineModel modelDes = PipelineModel.load("src/main/resources/model");
modelDes.transform(validationSet.firstN(100))
.select(new String[]{"text", "label", "pred"})
.firstN(5)
.print();
Expand Down

0 comments on commit 82eb19b

Please sign in to comment.