Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/6713#discussion_r31987019
--- Diff:
mllib/src/main/scala/org/apache/spark/mllib/regression/StreamingLinearAlgorithm.scala
---
@@ -83,18 +83,20 @@ abstract class StreamingLinearAlgorithm[
throw new IllegalArgumentException("Model must be initialized before
starting training.")
}
data.foreachRDD { (rdd, time) =>
- val initialWeights =
- model match {
- case Some(m) =>
- m.weights
+ if (rdd.toLocalIterator.nonEmpty) {
+ val initialWeights =
--- End diff --
Ah, as it happens, I meant to follow up on one change we should have made
yesterday in SPARK-8140 here: you can delete the entire `initialWeights` val
here and replace it in the following line with `m.weights`. It will remove a
warning. Can you pick that up too?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]