Github user felixcheung commented on the issue: https://github.com/apache/spark/pull/16312 ah, thank you @shivaram. sorry I couldn't get around to investigate earlier. @yanboliang It looks like that is the design in the trait BaseReadWrite ([here](https://github.com/apache/spark/blob/master/mllib/src/main/scala/org/apache/spark/ml/util/ReadWrite.scala#L80)), where it holds references to `sc`, `sqlContext` and `spark` session. Although, I see other MLReader/MLWriter calls `sc` directly whereas the design should allow for the `sc`/spark session to be updated? Specifically we could change to pass the spark session to the RWrapper for these calls but generally reusing `sc` is the design of BaseReadWrite/MLReader/MLWriter, and is not specific to R.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org