Github user jkbradley commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18281#discussion_r122524395
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/classification/OneVsRest.scala ---
    @@ -325,8 +350,13 @@ final class OneVsRest @Since("1.4.0") (
           multiclassLabeled.persist(StorageLevel.MEMORY_AND_DISK)
         }
     
    +    val iters = Range(0, numClasses).par
    +    iters.tasksupport = new ForkJoinTaskSupport(
    +      new ForkJoinPool(Math.min(getParallelism, numClasses))
    +    )
    +
         // create k columns, one for each binary classifier.
    -    val models = Range(0, numClasses).par.map { index =>
    +    val models = iters.map { index =>
    --- End diff --
    
    What do Futures add?  They require more code, and the functionality seems 
to be the same for the purposes of OneVsRest.


---
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]

Reply via email to