Uh oh!
There was an error while loading. Please reload this page.
[SPARK-30660][ML][PYSPARK] LinearRegression blockify input vectors - #27396
[SPARK-30660][ML][PYSPARK] LinearRegression blockify input vectors#27396zhengruifeng wants to merge 2 commits into
Conversation
zhengruifeng
commented
Jan 30, 2020
testCode: importorg.apache.spark.ml.regression._importorg.apache.spark.storage.StorageLevelvaldf= spark.read.format("libsvm").load("/data1/Datasets/a9a/a9a")
df.persist(StorageLevel.MEMORY_AND_DISK)
df.count
newLinearRegression().setMaxIter(10).fit(df)
vallr1=newLinearRegression().setSolver("l-bfgs").setLoss("squaredError").setMaxIter(100)
valstart=System.currentTimeMillis; valmodel1= lr1.fit(df); valend=System.currentTimeMillis; end - start
vallr2=newLinearRegression().setSolver("l-bfgs").setLoss("huber").setMaxIter(100)
valstart=System.currentTimeMillis; valmodel2= lr2.fit(df); valend=System.currentTimeMillis; end - start
Seq(model1, model2).map(_.summary.totalIterations)
Seq(model1, model2).map(_.summary.objectiveHistory.last)Result: Master: |
SparkQA
commented
Jan 30, 2020
Test build #117550 has finished for PR 27396 at commit
|
zhengruifeng
commented
Jan 30, 2020
retest this please |
SparkQA
commented
Jan 30, 2020
Test build #117558 has finished for PR 27396 at commit
|
zhengruifeng
commented
Jan 30, 2020
cc @srowen |
srowen
left a comment
There was a problem hiding this comment.
Generally looks OK pending tests, as it's consistent with other similar changes. I assume this doesn't change behavior or API - doesn't look so but just checking? and likewise perf is probably still fine on small data? Also CC @huaxingao
I know code freeze is coming tomorrow. I think we can get this in if there don't turn out to be any issues.
zhengruifeng
commented
Jan 31, 2020
@srowen The above test is also based on |
srowen
commented
Feb 1, 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, use blocks instead of vectors for performance improvement
2, use Level-2 BLAS
3, move standardization of input vectors outside of gradient computation
Why are the changes needed?
1, less RAM to persist training data; (save ~40%)
2, faster than existing impl; (30% ~ 102%)
Does this PR introduce any user-facing change?
add a new expert param
blockSizeHow was this patch tested?
updated testsuites