Uh oh!
There was an error while loading. Please reload this page.
[SPARK-30642][ML][PYSPARK] LinearSVC blockify input vectors - #27360
[SPARK-30642][ML][PYSPARK] LinearSVC blockify input vectors#27360zhengruifeng wants to merge 10 commits into
Conversation
testCode: importorg.apache.spark.ml.classification._importorg.apache.spark.storage.StorageLevelvardf= spark.read.format("libsvm").load("/data1/Datasets/a9a/a9a").withColumn("label", (col("label")+1)/2)
df.persist(StorageLevel.MEMORY_AND_DISK)
df.count
(0 until 8).foreach{ _ => df = df.union(df) }
df.count
newLinearSVC().setMaxIter(10).fit(df) // warm upvalsvc=newLinearSVC().setMaxIter(100)
valstart=System.currentTimeMillis; valmodel= svc.fit(df); valend=System.currentTimeMillis; end - start
valsvc=newLinearSVC().setMaxIter(100).setFitIntercept(false)
valstart=System.currentTimeMillis; valmodel= svc.fit(df); valend=System.currentTimeMillis; end - startresult: MASTER: Native-BLAS is NOT used in above tests, maybe future performance gain can be obtained by setting appropriate Native BLAS. |
There was a problem hiding this comment.
Move the standardization outside of HingeAggregator, so that no longer need to standardize input in each iter.
SparkQA
commented
Jan 25, 2020
Test build #117398 has finished for PR 27360 at commit
|
SparkQA
commented
Jan 25, 2020
Test build #117400 has finished for PR 27360 at commit
|
srowen
commented
Jan 25, 2020
OK, I would generally support it if it's not a huge change, optimizes performance, and doesn't change behavior / correctness. |
zhengruifeng
commented
Jan 26, 2020
I added |
SparkQA
commented
Jan 26, 2020
Test build #117404 has finished for PR 27360 at commit
|
SparkQA
commented
Jan 26, 2020
Test build #117407 has finished for PR 27360 at commit
|
zhengruifeng
commented
Jan 26, 2020
retest this please |
SparkQA
commented
Jan 26, 2020
Test build #117410 has finished for PR 27360 at commit
|
SparkQA
commented
Jan 26, 2020
Test build #117416 has finished for PR 27360 at commit
|
SparkQA
commented
Jan 26, 2020
Test build #117418 has finished for PR 27360 at commit
|
zhengruifeng
commented
Jan 26, 2020
retest this please |
SparkQA
commented
Jan 26, 2020
Test build #117420 has finished for PR 27360 at commit
|
2f84a3d to
cb91306CompareSparkQA
commented
Jan 27, 2020
Test build #117444 has finished for PR 27360 at commit
|
SparkQA
commented
Jan 28, 2020
Test build #117474 has finished for PR 27360 at commit
|
zhengruifeng
commented
Jan 28, 2020
Merged to master. |
### What changes were proposed in this pull request? Revert #27360#27396#27374#27389 ### Why are the changes needed? BLAS need more performace tests, specially on sparse datasets. Perfermance test of LogisticRegression (#27374) on sparse dataset shows that blockify vectors to matrices and use BLAS will cause performance regression. LinearSVC and LinearRegression were also updated in the same way as LogisticRegression, so we need to revert them to make sure no regression. ### Does this PR introduce any user-facing change? remove newly added param blockSize ### How was this patch tested? reverted testsuites Closes#27487 from zhengruifeng/revert_blockify_ii. Authored-by: zhengruifeng <ruifengz@foxmail.com> Signed-off-by: zhengruifeng <ruifengz@foxmail.com>
### What changes were proposed in this pull request? Revert #27360#27396#27374#27389 ### Why are the changes needed? BLAS need more performace tests, specially on sparse datasets. Perfermance test of LogisticRegression (#27374) on sparse dataset shows that blockify vectors to matrices and use BLAS will cause performance regression. LinearSVC and LinearRegression were also updated in the same way as LogisticRegression, so we need to revert them to make sure no regression. ### Does this PR introduce any user-facing change? remove newly added param blockSize ### How was this patch tested? reverted testsuites Closes#27487 from zhengruifeng/revert_blockify_ii. Authored-by: zhengruifeng <ruifengz@foxmail.com> Signed-off-by: zhengruifeng <ruifengz@foxmail.com>
### What changes were proposed in this pull request? Revert apache#27360apache#27396apache#27374apache#27389 ### Why are the changes needed? BLAS need more performace tests, specially on sparse datasets. Perfermance test of LogisticRegression (apache#27374) on sparse dataset shows that blockify vectors to matrices and use BLAS will cause performance regression. LinearSVC and LinearRegression were also updated in the same way as LogisticRegression, so we need to revert them to make sure no regression. ### Does this PR introduce any user-facing change? remove newly added param blockSize ### How was this patch tested? reverted testsuites Closesapache#27487 from zhengruifeng/revert_blockify_ii. Authored-by: zhengruifeng <ruifengz@foxmail.com> Signed-off-by: zhengruifeng <ruifengz@foxmail.com>
What changes were proposed in this pull request?
1, stack input vectors to blocks (like ALS/MLP);
2, add new param
blockSize;3, add a new class
InstanceBlock4, standardize the input outside of optimization procedure;
Why are the changes needed?
1, reduce RAM to persist traing dataset; (save ~40% in test)
2, use Level-2 BLAS routines; (12% ~ 41% faster, without native BLAS)
Does this PR introduce any user-facing change?
a new param
blockSizeHow was this patch tested?
existing and updated testsuites