update nlc examples to use new method signatures#310
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
| # training_data=training_data, name='weather'), indent=2)) | ||
| # metadata = json.dumps({'name': 'my-classifier', 'language': 'en'}) | ||
| # classifier = natural_language_classifier.create_classifier( | ||
| # metadata=metadata, |
There was a problem hiding this comment.
this should be training_metadata now, right?
There was a problem hiding this comment.
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.
| @@ -18,8 +18,12 @@ | |||
|
|
|||
| # create a classifier | |||
There was a problem hiding this comment.
is there a reason why these are commented out? are the examples run with some sort of CI?
There was a problem hiding this comment.
There was a problem hiding this comment.
Yes, the examples serve double-duty as they are used as integration tests. You can see this in the test/test_examples.py module.
fixes #307