Skip to content

update nlc examples to use new method signatures#310

Merged
ammardodin merged 2 commits intomasterfrom
mdk/306-update-create-classifier-example
Nov 26, 2017
Merged

update nlc examples to use new method signatures#310
ammardodin merged 2 commits intomasterfrom
mdk/306-update-create-classifier-example

Conversation

@ammardodin
Copy link
Copy Markdown
Contributor

fixes #307

@ammardodin ammardodin requested a review from mkistler November 25, 2017 20:24
@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 25, 2017

Codecov Report

Merging #310 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #310      +/-   ##
==========================================
+ Coverage   38.72%   38.74%   +0.02%     
==========================================
  Files          24       24              
  Lines        8292     8292              
==========================================
+ Hits         3211     3213       +2     
+ Misses       5081     5079       -2
Impacted Files Coverage Δ
watson_developer_cloud/watson_service.py 83.62% <0%> (+0.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7970a01...9993f13. Read the comment docs.

# training_data=training_data, name='weather'), indent=2))
# metadata = json.dumps({'name': 'my-classifier', 'language': 'en'})
# classifier = natural_language_classifier.create_classifier(
# metadata=metadata,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this should be training_metadata now, right?

Copy link
Copy Markdown
Contributor Author

@ammardodin ammardodin Nov 26, 2017

Choose a reason for hiding this comment

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

training_metadata is what we name the parameter when we send it to the service and what it expects, but the parameter is still called metadata for your purposes in invoking the method.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

gotcha, cool cool

@@ -18,8 +18,12 @@

# create a classifier
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is there a reason why these are commented out? are the examples run with some sort of CI?

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.

Copy link
Copy Markdown

@mkistler mkistler Nov 26, 2017

Choose a reason for hiding this comment

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

Yes, the examples serve double-duty as they are used as integration tests. You can see this in the test/test_examples.py module.

Copy link
Copy Markdown

@mkistler mkistler left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@ammardodin ammardodin merged commit c3fdf13 into master Nov 26, 2017
@ammardodin ammardodin deleted the mdk/306-update-create-classifier-example branch November 26, 2017 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

is create_classifier for NLC broken?

4 participants