[GitHub] spark pull request #22136: [SPARK-25124][ML]VectorSizeHint setSize and getSi...

2018-08-23 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/22136


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22136: [SPARK-25124][ML]VectorSizeHint setSize and getSi...

2018-08-23 Thread jkbradley
Github user jkbradley commented on a diff in the pull request:

https://github.com/apache/spark/pull/22136#discussion_r212483950
  
--- Diff: python/pyspark/ml/tests.py ---
@@ -844,6 +844,28 @@ def test_string_indexer_from_labels(self):
 
.select(model_default.getOrDefault(model_default.outputCol)).collect()
 self.assertEqual(len(transformed_list), 5)
 
+def test_vector_size_hint(self):
--- End diff --

Thanks!  FYI this still isn't really testing the return value of setSize, 
but I think it's OK since we don't really do that anywhere else : P and I'm 
confident in the above change.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22136: [SPARK-25124][ML]VectorSizeHint setSize and getSi...

2018-08-22 Thread huaxingao
Github user huaxingao commented on a diff in the pull request:

https://github.com/apache/spark/pull/22136#discussion_r212088986
  
--- Diff: python/pyspark/ml/tests.py ---
@@ -844,6 +844,28 @@ def test_string_indexer_from_labels(self):
 
.select(model_default.getOrDefault(model_default.outputCol)).collect()
 self.assertEqual(len(transformed_list), 5)
 
+def test_vector_size_hint(self):
--- End diff --

@jkbradley Sorry, my bad. I added set/getSize and removed VectorAssembler 
from the test to simply.  


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22136: [SPARK-25124][ML]VectorSizeHint setSize and getSi...

2018-08-22 Thread jkbradley
Github user jkbradley commented on a diff in the pull request:

https://github.com/apache/spark/pull/22136#discussion_r212069129
  
--- Diff: python/pyspark/ml/tests.py ---
@@ -844,6 +844,28 @@ def test_string_indexer_from_labels(self):
 
.select(model_default.getOrDefault(model_default.outputCol)).collect()
 self.assertEqual(len(transformed_list), 5)
 
+def test_vector_size_hint(self):
--- End diff --

This test doesn't test the 2 functions which were buggy.  Could you please 
test those (and simplify the test if possible)?  Thanks!


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #22136: [SPARK-25124][ML]VectorSizeHint setSize and getSi...

2018-08-17 Thread huaxingao
GitHub user huaxingao opened a pull request:

https://github.com/apache/spark/pull/22136

[SPARK-25124][ML]VectorSizeHint setSize and getSize don't return values

## What changes were proposed in this pull request?

In feature.py, VectorSizeHint setSize and getSize don't return value. Add 
return. 

## How was this patch tested?

I tested the changes on my local. 


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/huaxingao/spark spark-25124

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/22136.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #22136


commit 91a819af424778d284d66893cc6b11e1015720e0
Author: Huaxin Gao 
Date:   2018-08-17T18:15:53Z

[SPARK-25124]VectorSizeHint setSize and getSize don't return values




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org