forcedotcom / distributions

Low-level primitives for collapsed Gibbs sampling in python and C++
BSD 3-Clause "New" or "Revised" License
33 stars 25 forks source link

test_sample_matches_score_counts fails for lp.LowEntropy #74

Open stephentu opened 10 years ago

stephentu commented 10 years ago

I am getting persistent failure of one of the tests:

======================================================================
FAIL: distributions.tests.test_clustering.test_sample_matches_score_counts('lp.LowEntropy',)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/stephentu/anaconda/envs/distributions_clean/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/stephentu/distributions_clean/distributions/tests/test_clustering.py", line 92, in test_one_model
    test_fun(Model, EXAMPLE, sample_count)
  File "/Users/stephentu/distributions_clean/distributions/tests/test_clustering.py", line 164, in test_sample_matches_score_counts
    assert_greater(gof, MIN_GOODNESS_OF_FIT)
AssertionError: 0.00042565398058435689 not greater than 0.001
-------------------- >> begin captured stdout << ---------------------
example 1/4
sample_size = 2
    Prob    Count
   0.738     1428 ------------------------------------------------------------
   0.262      572 ------------------------
LowEntropy gof = 0.000426

--------------------- >> end captured stdout << ----------------------

Here's how I'm building/running the tests:

(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ git log -n1
commit 8867b7823b3ab1dc0fa041f1fe25089d8393ca89
Merge: e1c80d0 3c82590
Author: jglidden-salesforce <jglidden@salesforce.com>
Date:   Fri Aug 1 16:26:40 2014 -0700

    Merge pull request #72 from forcedotcom/rng-args

    Rng args
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ mkdir build
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ cd build
(distributions_clean)stephentu@ibanez:~/distributions_clean/build(master)$  cmake -DCMAKE_INSTALL_PREFIX=/Users/stephentu/anaconda/envs/distributions_clean -DEXTRA_INCLUDE_PATH=/Users/stephentu/anaconda/envs/distributions_clean/include -DEXTRA_LIBRARY_PATH=/Users/stephentu/anaconda/envs/distributions_clean/lib ..
-- The C compiler identification is AppleClang 5.1.0.5030040
-- The CXX compiler identification is AppleClang 5.1.0.5030040
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CXX_FLAGS = -stdlib=libc++ -mmacosx-version-min=10.7 -Wno-deprecated-register -fPIC -g -std=c++0x -Wall -Wextra -Werror -Wno-unused-parameter -Wno-strict-aliasing -O3 -mfpmath=sse -msse4.1 -ffast-math -funsafe-math-optimizations
[... snip ...]
(distributions_clean)stephentu@ibanez:~/distributions_clean/build(master)$  make && make install && cd ..
[... snip ...]
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ PYDISTRIBUTIONS_USE_LIB=1 LIBRARY_PATH=/Users/stephentu/anaconda/envs/distributions_clean/lib EXTRA_INCLUDE_PATH=/Users/stephentu/anaconda/envs/distributions_clean/include pip install -e .
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ export DYLD_FALLBACK_LIBRARY_PATH=~/anaconda/envs/distributions_clean/lib
(distributions_clean)stephentu@ibanez:~/distributions_clean(master)$ nosetests -v distributions
fritzo commented 10 years ago

If this is trashing your test environment, feel free to request a pull adding a line

raise SkipTest("FIXME(fobermeyer) test fails spurriously")