Skip to content

[ML][docs][minor] Define LabeledDocument/Document classes in CV example#5135

Closed
petro-rudenko wants to merge 2 commits into
apache:masterfrom
petro-rudenko:patch-3
Closed

[ML][docs][minor] Define LabeledDocument/Document classes in CV example#5135
petro-rudenko wants to merge 2 commits into
apache:masterfrom
petro-rudenko:patch-3

Conversation

@petro-rudenko

Copy link
Copy Markdown
Contributor

To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example.

To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example.
@AmplabJenkins

Copy link
Copy Markdown

Can one of the admins verify this patch?

@srowen

srowen commented Mar 23, 2015

Copy link
Copy Markdown
Member

It seems reasonable, but adds a fair bit of code to the Java example. I'm not sure if the intent was that it be runnable, or simply illustrate a snippet of the core API usage. @mengxr

@mengxr

mengxr commented Mar 24, 2015

Copy link
Copy Markdown
Contributor

I'm okay with this change, which makes the example self-contained and hence users can try it out easily.

@mengxr

mengxr commented Mar 24, 2015

Copy link
Copy Markdown
Contributor

add to whitelist

@mengxr

mengxr commented Mar 24, 2015

Copy link
Copy Markdown
Contributor

ok to test

Comment thread docs/ml-guide.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Long -> long

@SparkQA

SparkQA commented Mar 24, 2015

Copy link
Copy Markdown

Test build #29051 has started for PR 5135 at commit 1d35383.

  • This patch merges cleanly.

@SparkQA

SparkQA commented Mar 24, 2015

Copy link
Copy Markdown

Test build #29051 has finished for PR 5135 at commit 1d35383.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class LabeledDocument(id: Long, text: String, label: Double)
    • case class Document(id: Long, text: String)
    • public class Document implements Serializable
    • public class LabeledDocument extends Document implements Serializable

@AmplabJenkins

Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29051/
Test PASSed.

@SparkQA

SparkQA commented Mar 24, 2015

Copy link
Copy Markdown

Test build #29088 has started for PR 5135 at commit 5190c75.

  • This patch merges cleanly.

@SparkQA

SparkQA commented Mar 24, 2015

Copy link
Copy Markdown

Test build #29088 has finished for PR 5135 at commit 5190c75.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class LabeledDocument(id: Long, text: String, label: Double)
    • case class Document(id: Long, text: String)
    • public class Document implements Serializable
    • public class LabeledDocument extends Document implements Serializable

@AmplabJenkins

Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/29088/
Test PASSed.

Comment thread docs/ml-guide.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK so this is intentionally duplicated from the example above? I guess that's reasonable since the point is to be self-contained, and I don't imagine there's a lot of maintenance overhead in trying to evolve both copies together.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes it's annoying when copy/pasting a bunch of code into spark shell and it fails because these classes are not declared.

asfgit pushed a commit that referenced this pull request Mar 24, 2015
To easier copy/paste Cross-Validation example code snippet need to define LabeledDocument/Document in it, since they difined in a previous example.

Author: Peter Rudenko <petro.rudenko@gmail.com>

Closes #5135 from petro-rudenko/patch-3 and squashes the following commits:

5190c75 [Peter Rudenko] Fix primitive types for java examples.
1d35383 [Peter Rudenko] [SQL][docs][minor] Define LabeledDocument/Document classes in CV example

(cherry picked from commit 08d4528)
Signed-off-by: Sean Owen <sowen@cloudera.com>
@asfgit asfgit closed this in 08d4528 Mar 24, 2015
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.

5 participants