Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14585][ML][WIP] Provide accessor methods for Pipeline stages - #12420
[SPARK-14585][ML][WIP] Provide accessor methods for Pipeline stages#12420pravingadakh wants to merge 1 commit into
Conversation
jkbradley
commented
Apr 20, 2016
test this please |
SparkQA
commented
Apr 20, 2016
Test build #56401 has finished for PR 12420 at commit
|
jkbradley
commented
Apr 20, 2016
@pravingadakh Thanks! This is what I had in mind. In your tests, could you please add Java unit tests too to make sure these are Java-friendly? Also, please check the type and throw exceptions when the type does not match. I'd recommend throwing IllegalArgumentException and specifying the expected and actual types. |
| /** Returns stage at index i in Pipeline */ | ||
| @Since("2.0.0") | ||
| def getStage[T <: PipelineStage](i: Int): T = getStages.apply(i).asInstanceOf[T] |
There was a problem hiding this comment.
Here and elsewhere, I would just write array(i) instead of array.apply(i)
Also, can you please document the @tparam?
pravingadakh
commented
Apr 23, 2016
@jkbradley I'll update the PR accordingly. |
jkbradley
commented
Apr 26, 2016
By the way, we'll need to get this merged quickly for it to make 2.0. (Thanks!) |
pravingadakh
commented
Apr 28, 2016
@jkbradley I'll update it soon. |
pravingadakh
commented
May 2, 2016
@jkbradley I have stumbled across an issue, would really appreciate your input. Have a look at this method: How do I avoid usage of |
AmplabJenkins
commented
Nov 27, 2016
Can one of the admins verify this patch? |
| def getStages: Array[PipelineStage] = $(stages).clone() | ||
| /** Returns stage at index i in Pipeline */ | ||
| @Since("2.0.0") |
There was a problem hiding this comment.
Can't be since 2.0.0 at this point. Also use a @return tag in the docs.
| /** Returns all stages of this type */ | ||
| @Since("2.0.0") | ||
| def getStagesOfType[T <: PipelineStage]: Array[T] = { | ||
| getStages.collect { |
There was a problem hiding this comment.
Nit: This is probably more natural as a one-liner
jkbradley
commented
Dec 22, 2016
@pravingadakh Will you be able to continue with this? Thanks! |
jkbradley
commented
Feb 2, 2017
I missed the ClassTag question above. Let me take a look |
jkbradley
commented
Feb 2, 2017
Well, after spending a while looking around, I haven't found a good way to write this and make it Java friendly (i.e., not use ClassTag, Type, or TypeTag). Does anyone else have ideas? I'll try to return to this before long... |
HyukjinKwon
commented
May 11, 2017
Hi @@pravingadakh, is this still active? |
## What changes were proposed in this pull request? This PR proposes to close PRs ... - inactive to the review comments more than a month - WIP and inactive more than a month - with Jenkins build failure but inactive more than a month - suggested to be closed and no comment against that - obviously looking inappropriate (e.g., Branch 0.5) To make sure, I left a comment for each PR about a week ago and I could not have a response back from the author in these PRs below: Closesapache#11129Closesapache#12085Closesapache#12162Closesapache#12419Closesapache#12420Closesapache#12491Closesapache#13762Closesapache#13837Closesapache#13851Closesapache#13881Closesapache#13891Closesapache#13959Closesapache#14091Closesapache#14481Closesapache#14547Closesapache#14557Closesapache#14686Closesapache#15594Closesapache#15652Closesapache#15850Closesapache#15914Closesapache#15918Closesapache#16285Closesapache#16389Closesapache#16652Closesapache#16743Closesapache#16893Closesapache#16975Closesapache#17001Closesapache#17088Closesapache#17119Closesapache#17272Closesapache#17971 Added: Closesapache#17778Closesapache#17303Closesapache#17872 ## How was this patch tested? N/A Author: hyukjinkwon <gurwls223@gmail.com> Closesapache#18017 from HyukjinKwon/close-inactive-prs.
What changes were proposed in this pull request?
This PR adds accessor methods for pipeline stages in
PipelineandPipelineModelclasses.@jkbradley Hi, please validate if this is something that you had in mind. If so, I can start on test cases for these.