Skip to content

Commit 2fe0667

Browse files
author
Devaraj K
committed
Updated to overwrite the files to support running the example multiple
times without deleting the files
1 parent e20c920 commit 2fe0667

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/src/main/scala/org/apache/spark/examples/ml/PipelineExample.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ object PipelineExample {
6262
val model = pipeline.fit(training)
6363

6464
// Now we can optionally save the fitted pipeline to disk
65-
model.save("/tmp/spark-logistic-regression-model")
65+
model.write.overwrite().save("/tmp/spark-logistic-regression-model")
6666

6767
// We can also save this unfit pipeline to disk
68-
pipeline.save("/tmp/unfit-lr-model")
68+
pipeline.write.overwrite().save("/tmp/unfit-lr-model")
6969

7070
// And load it back in during production
7171
val sameModel = PipelineModel.load("/tmp/spark-logistic-regression-model")

0 commit comments

Comments
 (0)