-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Movie sample changes (in progress) - DO NOT MERGE before Nov 15. #597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1dd8560
2753f2f
1e8f574
1a61c15
f9aa66c
3eb8497
5287e47
c3f44ab
884f431
531b256
0df605c
6d25d40
9b5c64b
affaf19
0c60cb5
a63ab55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,18 +69,18 @@ def test_process_movie_reviews(): | |
entities = [json.loads(entity) for entity in entities] | ||
|
||
# assert sentiments | ||
assert sentiments[0].get('sentiment') == 1.0 | ||
assert sentiments[0].get('sentiment') == 0.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can't these values change as the model changes? Should you just assert that sentiments are some non-None value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes but they don't happen that frequently. And so above check allows us to see if something really failed. Non-None will not allow us to detect some issue model or API might have. |
||
assert sentiments[0].get('label') == 1 | ||
|
||
assert sentiments[1].get('sentiment') == 1.0 | ||
assert sentiments[1].get('sentiment') == 0.9 | ||
assert sentiments[1].get('label') == 1 | ||
|
||
# assert entities | ||
assert len(entities) == 1 | ||
assert entities[0].get('name') == 'Tom Cruise' | ||
assert (entities[0].get('wiki_url') == | ||
'http://en.wikipedia.org/wiki/Tom_Cruise') | ||
assert entities[0].get('sentiment') == 2.0 | ||
assert entities[0].get('sentiment') == 1.8 | ||
|
||
|
||
def test_rank_positive_entities(capsys): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should only need to specify
credentials
and nothttp
, yeah?