Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-7549

afw:testGaussianProcess has an intermittent test failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw
    • Story Points:
      3

      Description

      Sometimes the afw test testGausisianProcess.py can fail:

      ...
      ======================================================================
      FAIL: testTooManyNeighbors (__main__.GaussianProcessTestCase)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "./tests/testGaussianProcess.py", line 62, in testTooManyNeighbors
          gg.selfInterpolate(sigma, -1, nData-1)
      AssertionError: Exception not raised
      ----------------------------------------------------------------------
      Ran 11 tests in 1.992s
      FAILED (failures=1)
      

      This is a very rare failure. It ran 102 times on my laptop before it stopped with this failure. So far we have only seen reports of this failure on Python 3.

        Attachments

          Issue Links

            Activity

            Hide
            jmeyers314 Joshua Meyers added a comment -

            There's no special treatment of negative indices there.

            Good to know. Thanks.

            I think that also explains the randomness of the failures. Some small fraction of the time, the memory right before the interpolation points happens to say 0.0, and then neither the intended nor the bonus exception (the "Nearest neighbor search in selfInterpolate did not find self\n") get triggered, which triggers the assertRaises unit test.

            Show
            jmeyers314 Joshua Meyers added a comment - There's no special treatment of negative indices there. Good to know. Thanks. I think that also explains the randomness of the failures. Some small fraction of the time, the memory right before the interpolation points happens to say 0.0, and then neither the intended nor the bonus exception (the "Nearest neighbor search in selfInterpolate did not find self\n") get triggered, which triggers the assertRaises unit test.
            Hide
            hchiang2 Hsin-Fang Chiang added a comment -

            I just saw this failure on my machine with Python 2, but my next rebuild passed. It wasn't with the master afw but I don't think I did changes related to this test (however I don't know afw well). Searching on Jira led me to this ticket so I think I'd report it.

            Show
            hchiang2 Hsin-Fang Chiang added a comment - I just saw this failure on my machine with Python 2, but my next rebuild passed. It wasn't with the master afw but I don't think I did changes related to this test (however I don't know afw well). Searching on Jira led me to this ticket so I think I'd report it.
            Hide
            tjenness Tim Jenness added a comment -

            Thank you for the first Python 2 report. The code is very broken and needs an overhaul. I think we are just getting lucky with python 2 memory layouts.

            Show
            tjenness Tim Jenness added a comment - Thank you for the first Python 2 report. The code is very broken and needs an overhaul. I think we are just getting lucky with python 2 memory layouts.
            Hide
            danielsf Scott Daniel added a comment -

            This pull request adds tests to all of the user-facing methods in GaussianProcess.cc. These tests ensure (or ought to) that exceptions are thrown if users pass in invalid inputs.

            I also took the opportunity to flesh-out testGaussianProcess.py so that the functionality of GaussianProcess.cc is tested more methodically.

            I added some methods to the GaussianProcess class to allow users to inspect its contents (specifically methods to return the data points and function values underlying the GaussianProcess).

            Show
            danielsf Scott Daniel added a comment - This pull request adds tests to all of the user-facing methods in GaussianProcess.cc. These tests ensure (or ought to) that exceptions are thrown if users pass in invalid inputs. I also took the opportunity to flesh-out testGaussianProcess.py so that the functionality of GaussianProcess.cc is tested more methodically. I added some methods to the GaussianProcess class to allow users to inspect its contents (specifically methods to return the data points and function values underlying the GaussianProcess).
            Hide
            danielsf Scott Daniel added a comment -

            reviewed by Josh Meyers

            Show
            danielsf Scott Daniel added a comment - reviewed by Josh Meyers

              People

              Assignee:
              danielsf Scott Daniel
              Reporter:
              tjenness Tim Jenness
              Reviewers:
              Joshua Meyers
              Watchers:
              Fred Moolekamp, Hsin-Fang Chiang, John Parejko, John Swinbank, Joshua Meyers, Paul Price, Scott Daniel, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.