coralnet / pyspacer

Python based tools for spatial image analysis
MIT License
6 stars 2 forks source link

unit-tests fail on master #21

Closed beijbom closed 4 years ago

beijbom commented 4 years ago
docker build -t spacer:test .
docker run -v ~/spacermodels/:/workspace/models -it spacer:test python3 spacer/tests/test_extract_features.py TestCaffeExtractor.test_regression

fails on master with

======================================================================
FAIL: test_regression (__main__.TestCaffeExtractor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "spacer/tests/test_extract_features.py", line 176, in test_regression
    self.assertEqual(pf_new.data, pf_legacy.data)
AssertionError: Lists differ: [0.0, 3.03959321975708, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0[28705 chars] 0.0] != [0.0, 3.039593458175659, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, [28707 chars] 0.0]

First differing element 1:
3.03959321975708
3.039593458175659

I went back and checked out https://github.com/beijbom/pyspacer/commit/aee4cad5f65399f708f2f5223b71a55123474a86 which was before the EfficientNet integration and refactor, and the test passes there.

@qiminchen : I'm afraid something you did in the refactor caused this test to break. Can you trouble-shoot this please? To be clear, it may be that you fixed something that was broken, but either way, let's find out what it was so we can decide whether to update the test-fixture or revert back to the old code.

beijbom commented 4 years ago

... you should be able to simply go through the list at https://github.com/beijbom/pyspacer/commits/master, check out each commit, build, test, etc. until you find the breaking change.

beijbom commented 4 years ago

... I just checked and the test fails on the efficientnet_extractor branch that was merged. My bad for not running the docker test-suite before approving.