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

    https://github.com/apache/spark/pull/6562#discussion_r31541402
  
    --- Diff: mllib/src/test/java/org/apache/spark/ml/param/JavaTestParams.java 
---
    @@ -72,15 +72,31 @@ public JavaTestParams setMyStringParam(String value) {
         set(myStringParam_, value); return this;
       }
     
    +  private DoubleArrayParam myDoubleArrayParam_;
    +  public DoubleArrayParam myDoubleArrayParam() { return 
myDoubleArrayParam_; }
    +
    +  public double[] getMyDoubleArrayParam() { return 
getOrDefault(myDoubleArrayParam_); }
    +
    +  public JavaTestParams setMyDoubleArrayParam(double[] value) {
    +    set(myDoubleArrayParam_, value); return this;
    +  }
    +
       private void init() {
    -    myIntParam_ = new IntParam(this, "myIntParam", "this is an int param", 
ParamValidators.gt(0));
    +    myIntParam_ = new IntParam(this, "myIntParam", "this is an int param",
    +      ParamValidators.gt(0));
         myDoubleParam_ = new DoubleParam(this, "myDoubleParam", "this is a 
double param",
           ParamValidators.inRange(0.0, 1.0));
         List<String> validStrings = Lists.newArrayList("a", "b");
         myStringParam_ = new Param<String>(this, "myStringParam", "this is a 
string param",
           ParamValidators.inArray(validStrings));
    +    myDoubleArrayParam_ =
    +      new DoubleArrayParam(this, "myDoubleArrayParam", "this is a double 
param");
    +
         setDefault(myIntParam_, 1);
    +    setDefault(myIntParam_.w(1));
    --- End diff --
    
    minor: We should test `myIntParam()` instead of `myIntParam_`. The latter 
is private.


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