Skip to content

[SPARK-16750] [Follow-up] [ML] Add transformSchema for StringIndexer/VectorAssembler and fix failed tests. - #14455

Closed
yanboliang wants to merge 1 commit into
apache:masterfrom
yanboliang:transformSchema
Closed

[SPARK-16750] [Follow-up] [ML] Add transformSchema for StringIndexer/VectorAssembler and fix failed tests.#14455
yanboliang wants to merge 1 commit into
apache:masterfrom
yanboliang:transformSchema

Conversation

@yanboliang

@yanboliangyanboliang commented Aug 2, 2016

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This is follow-up for #14378. When we add transformSchema for all estimators and transformers, I found there are tests failed for StringIndexer and VectorAssembler. So I moved these parts of work separately in this PR, to make it more clear to review.
The corresponding tests should throw IllegalArgumentException at schema validation period after we add transformSchema. It's efficient that to throw exception at the start of fit or transform rather than during the process.

How was this patch tested?

Modified unit tests.

@SparkQA

Copy link
Copy Markdown

Test build #63113 has finished for PR 14455 at commit 9dee09e.

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

@yanboliang

Copy link
Copy Markdown
ContributorAuthor

@srowen Would you mind to have a look when you are available? This is follow-up for #14378. Thanks!

@srowen

Copy link
Copy Markdown
Member

OK, add SPARK-16750 in the title

@yanboliangyanboliang changed the title [Follow-up] [ML] Add transformSchema for StringIndexer/VectorAssembler and fix failed tests.[SPARK-16750] [Follow-up] [ML] Add transformSchema for StringIndexer/VectorAssembler and fix failed tests.Aug 5, 2016
@yanboliang

Copy link
Copy Markdown
ContributorAuthor

@srowen Added. Thanks!

@srowen

Copy link
Copy Markdown
Member

Merged to master/2.0 also

asfgit pushed a commit that referenced this pull request Aug 5, 2016
…ctorAssembler and fix failed tests.
## What changes were proposed in this pull request?
This is follow-up for #14378. When we add ```transformSchema``` for all estimators and transformers, I found there are tests failed for ```StringIndexer``` and ```VectorAssembler```. So I moved these parts of work separately in this PR, to make it more clear to review.
The corresponding tests should throw ```IllegalArgumentException``` at schema validation period after we add ```transformSchema```. It's efficient that to throw exception at the start of ```fit``` or ```transform``` rather than during the process.
## How was this patch tested?
Modified unit tests.
Author: Yanbo Liang <ybliang8@gmail.com>
Closes#14455 from yanboliang/transformSchema.
(cherry picked from commit 6cbde33)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@asfgitasfgit closed this in 6cbde33Aug 5, 2016
@yanboliang
yanboliang deleted the transformSchema branch August 6, 2016 09:06
Sign up for freeto 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.

3 participants

@yanboliang@SparkQA@srowen