Skip to content

Conversation

@WeichenXu123
Copy link
Contributor

@WeichenXu123 WeichenXu123 commented Dec 27, 2017

What changes were proposed in this pull request?

Currently, in ChiSqSelectorModel, save:

spark.createDataFrame(dataArray).repartition(1).write...

The default partition number used by createDataFrame is "defaultParallelism",
Current RoundRobinPartitioning won't guarantee the "repartition" generating the same order result with local array. We need fix it.

How was this patch tested?

N/A

@WeichenXu123
Copy link
Contributor Author

Currently I cannot construct a failed test for this issue, but the future PR (changing RoundRobinPartitioning) by @jiangxb1987 will trigger this bug.

@SparkQA
Copy link

SparkQA commented Dec 27, 2017

Test build #85422 has finished for PR 20088 at commit 5fd56c3.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Copy link
Contributor

@jiangxb1987 jiangxb1987 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if we want to keep the output sequence then it is recommended to avoid performing repartition() without extra sort, because the repartition() function doesn't guarantee that sequence is kept.
We should also fix other similar places where we perform a repartition() during save().

@jkbradley
Copy link
Member

This is hopefully a rare case of an error in assuming an ordering of rows; in general, we shouldn't (and don't, AFAIK) assume an order for rows in saving/loading models.

LGTM, but before this is merged, can you please remove the ML and CORE tags from the PR title @WeichenXu123 ?

@WeichenXu123 WeichenXu123 changed the title [SPARK-22905][ML][MLLIB][CORE] Fix ChiSqSelectorModel save implementation [SPARK-22905][MLLIB] Fix ChiSqSelectorModel save implementation Dec 28, 2017
@jkbradley
Copy link
Member

Merging with master
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants