Skip to content

test_analyze_entities: salience outside expected range #2274

Closed

Description

@tseaver

From: https://travis-ci.org/GoogleCloudPlatform/google-cloud-python/builds/158529136#L1224-L1232

======================================================================
FAIL: test_analyze_entities (language.TestLanguage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/GoogleCloudPlatform/google-cloud-python/system_tests/language.py", line 103, in test_analyze_entities
    self._check_analyze_entities_result(entities)
  File "/home/travis/build/GoogleCloudPlatform/google-cloud-python/system_tests/language.py", line 77, in _check_analyze_entities_result
    self.assertTrue(0.7 < entity1.salience < 0.8)
AssertionError: False is not true

Activity

  1. tseaver commented on Sep 8, 2016

    @tseaver
    ContributorAuthor

    Similar error in test_anaylze_entities_from_blob:

    ======================================================================
    FAIL: test_analyze_entities_from_blob (language.TestLanguage)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/travis/build/GoogleCloudPlatform/google-cloud-python/system_tests/language.py", line 117, in test_analyze_entities_from_blob
        self._check_analyze_entities_result(entities)
      File "/home/travis/build/GoogleCloudPlatform/google-cloud-python/system_tests/language.py", line 77, in _check_analyze_entities_result
        self.assertTrue(0.7 < entity1.salience < 0.8)
    AssertionError: False is not true
  2. dhermes commented on Sep 8, 2016

    @dhermes
    Contributor

    Indeed. Le sigh.

    $ nosetests system_tests/language.py --pdb
    > /usr/lib/python2.7/unittest/case.py(422)assertTrue()
    -> raise self.failureException(msg)
    (Pdb) u
    > .../gcloud-python/system_tests/language.py(77)_check_analyze_entities_result()
    -> self.assertTrue(0.7 < entity1.salience < 0.8)
    (Pdb) entity1
    <google.cloud.language.entity.Entity object at 0x7f1fc87e07d0>
    (Pdb) entity1.salience
    0.81992269
    (Pdb) 
    
  3. dhermes commented on Sep 8, 2016

    @dhermes
    Contributor

    @jgeewax Can you weigh in here? The actual output of the API seems to be a moving target. Note that the input is a simple sentence that hasn't changed:

    Michelangelo Caravaggio, Italian painter, is known for 'The Calling of Saint Matthew'.
    
  4. dhermes commented on Sep 9, 2016

    @dhermes
    Contributor

    In the meanwhile I'm going to let this set of tests go green, working on a PR now

  5. added a commit that references this issue on Sep 9, 2016
    1b81d0e
  6. dhermes commented on Sep 9, 2016

    @dhermes
    Contributor

    @jgeewax Can you weigh in here?

  7. reopened this on Sep 9, 2016
  8. jgeewax commented on Sep 16, 2016

    @jgeewax
    Contributor

    I expect that the underlying model used here will evolve and "get better" over time. We should assert that there is a salience that is non-zero -- but how "salient" something is as determined by the algorithm can't be frozen.

    If we get back a zero, missing, etc, that means that the API contract is just "broken", but 0.75 today and 0.82 tomorrow doesn't mean our client is busted...

  9. removed their assignment
    on Sep 16, 2016
  10. added a commit that references this issue on Sep 16, 2016
    0bc8de4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions