zhengruifeng commented on code in PR #47328:
URL: https://github.com/apache/spark/pull/47328#discussion_r1676694335
##########
mllib/src/main/scala/org/apache/spark/ml/r/AFTSurvivalRegressionWrapper.scala:
##########
@@ -129,7 +129,9 @@ private[r] object AFTSurvivalRegressionWrapper extends
MLReadable[AFTSurvivalReg
val rMetadata = ("class" -> instance.getClass.getName) ~
("features" -> instance.features.toImmutableArraySeq)
val rMetadataJson: String = compact(render(rMetadata))
- sc.parallelize(Seq(rMetadataJson), 1).saveAsTextFile(rMetadataPath)
+ sparkSession.createDataFrame(
Review Comment:
this is what ML scala using for model save and load:
https://github.com/apache/spark/blob/3ae78c4c39a7084a321f2e01b4745cb6c442b7a5/mllib/src/main/scala/org/apache/spark/ml/regression/AFTSurvivalRegression.scala#L493-L523
as a R wrapper, I think it is fine to do it in the same way
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]