Install on Mac OS failed unit tests

Hi !

It is January 7, 2017…Happy New Year.

I am running
Mac OS Sierra version 10.12.2.
python version 2.7.10

And I am following the youtube video for doing an install of nupic.
I just did the pip install and the git clone so I have fairly fresh versions.

I had errors that look like this:

tests/unit/nupic/research/spatial_pooler_boost_test.py:305: SpatialPoolerBoostTest.testBoostingCPP FAILED
tests/unit/nupic/research/spatial_pooler_boost_test.py:301: SpatialPoolerBoostTest.testBoostingPY FAILED
tests/unit/nupic/research/spatial_pooler_compatability_test.py:239: SpatialPoolerCompatibilityTest.testCompatibility1 FAILED
tests/unit/nupic/research/spatial_pooler_compatability_test.py:291: SpatialPoolerCompatibilityTest.testCompatibility2 FAILED
tests/unit/nupic/research/spatial_pooler_compatability_test.py:313: SpatialPoolerCompatibilityTest.testCompatibility3 FAILED
tests/unit/nupic/research/spatial_pooler_compatability_test.py:269: SpatialPoolerCompatibilityTest.testCompatibilityNoLearn FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1036: SpatialPoolerTest.testAdaptSynapses FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:690: SpatialPoolerTest.testAvgColumnsPerInput FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:727: SpatialPoolerTest.testAvgConnectedSpanForColumn1D FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:749: SpatialPoolerTest.testAvgConnectedSpanForColumn2D FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:841: SpatialPoolerTest.testAvgConnectedSpanForColumnND FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:895: SpatialPoolerTest.testBumpUpWeakColumns FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1185: SpatialPoolerTest.testCalculateOverlap FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:80: SpatialPoolerTest.testCompute1 FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:116: SpatialPoolerTest.testCompute2 FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:265: SpatialPoolerTest.testExactOutput FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:533: SpatialPoolerTest.testInhibitColumns FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1375: SpatialPoolerTest.testInhibitColumnsGlobal FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1398: SpatialPoolerTest.testInhibitColumnsLocal FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1255: SpatialPoolerTest.testInitPermanence1 FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1297: SpatialPoolerTest.testInitPermanence2 FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1007: SpatialPoolerTest.testIsUpdateRound FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:359: SpatialPoolerTest.testMapColumn FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:515: SpatialPoolerTest.testMapPotential1Column1Input FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:421: SpatialPoolerTest.testMapPotential1D FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:466: SpatialPoolerTest.testMapPotential2D FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:236: SpatialPoolerTest.testOverlapsOutput FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1106: SpatialPoolerTest.testRaisePermanenceThreshold FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1525: SpatialPoolerTest.testRandomSPDoesNotLearn FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:327: SpatialPoolerTest.testStripNeverLearned FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:612: SpatialPoolerTest.testUpdateBoostFactors FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1338: SpatialPoolerTest.testUpdateDutyCycleHelper FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:655: SpatialPoolerTest.testUpdateInhibitionRadius FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:936: SpatialPoolerTest.testUpdateMinDutyCycleLocal FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:974: SpatialPoolerTest.testUpdateMinDutyCyclesGlobal FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1143: SpatialPoolerTest.testUpdatePermanencesForColumn FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:1455: SpatialPoolerTest.testWriteRead FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:151: SpatialPoolerTest.testZeroOverlap_NoStimulusThreshold_GlobalInhibition FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:191: SpatialPoolerTest.testZeroOverlap_NoStimulusThreshold_LocalInhibition FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:171: SpatialPoolerTest.testZeroOverlap_StimulusThreshold_GlobalInhibition FAILED
tests/unit/nupic/research/spatial_pooler_unit_test.py:216: SpatialPoolerTest.testZeroOverlap_StimulusThreshold_LocalInhibition FAILED

Also, when I try to do the simple hotgym opf I get:

Phillips-iMac:simple phillipneal$ python hotgym.py
Traceback (most recent call last):
  File "hotgym.py", line 30, in <module>
    from nupic.frameworks.opf.metrics import MetricSpec
ImportError: No module named nupic.frameworks.opf.metrics

When I do the check for frameworks everything seems ok.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import nupic

In [2]: import nupic.frameworks

In [3]: from nupic.frameworks.opf.metrics import MetricSpec

In [4]: quit

Help !!

1 Like

It looks like you’re running the "pip install"ed version on nupic, but with unit tests that have been updated since the last nupic release. The last release was in November, but the Spatial Pooler changed in December.

You’ll probably want to install from the repo:

pip uninstall nupic
cd nupic
python setup.py develop [--user]

Hi Marcus,

Thank you for your quick response.
I uninstalled everywhere and verified with:

IPython 5.1.0 – An enhanced Interactive Python.
? -> Introduction and overview of IPython’s features.
%quickref -> Quick reference.
help -> Python’s own help system.
object? -> Details about ‘object’, use ‘object??’ for extra details.

In [1]: import nupic

ImportError Traceback (most recent call last)
in ()
----> 1 import nupic

ImportError: No module named nupic

In [2]: quit

Did:

git clone https://github.com/numenta/nupic.git

Then I ran :

Phillips-iMac:nupic phillipneal$ python setup.py develop --user

and got:

error in nupic setup command: Invalid environment marker: platform_system==‘Linux’ or platform_system==‘Darwin’

Hi Marcus,

Should I just install an older version like :

pip install nupic==0.5.5

?

I am having similar problemas with Mac OS version 10.11. Any help would be greatly appreciated.

If you install nupic from binary (pip install nupic), that means you get the latest stable version of NuPIC, which could be days or weeks old. If you want to run unit tests from the source code, make sure that you have checked out proper commit SHA in git to sync the tests with the stable version of NuPIC.

For example, if you installed nupic 0.5.7, you should run this command in your git repo before running unit tests:

git fetch upstream

Where upstream is a remote that points to https://github.com/numenta/nupic. This will fetch any tags for releases from the remote.

git checkout tags/0.5.7

This will set your local code to match the release code. Beware this could alter any changes you’ve made to your local filesystem.

Now you can run tests.

Hi Matt,

Thank you for your response.
It still doesn’t run ( I should probably get an Ubuntu box…sigh)

Here is the screen grab:

Phillips-iMac:nupic phillipneal$ git remote -v
origin https://github.com/numenta/nupic.git (fetch)
origin https://github.com/numenta/nupic.git (push)
upstream https://github.com/numenta/nupic (fetch)
upstream https://github.com/numenta/nupic (push)
Phillips-iMac:nupic phillipneal$ git fetch upstream
Phillips-iMac:nupic phillipneal$ git checkout tags/0.5.7
HEAD is now at 5cd6668… Prepare for 0.5.7 release by setting version and adding CHANGELOG notes.
Phillips-iMac:nupic phillipneal$ python ./scripts/run_nupic_tests.py -u
Traceback (most recent call last):
File “./scripts/run_nupic_tests.py”, line 263, in
os.chdir(os.getenv(‘NUPIC’))
TypeError: coercing to Unicode: need string or buffer, NoneType found
Phillips-iMac:nupic phillipneal$

Ok, that’s a simple fix, just set the NUPIC env var to be the path to your nupic checkout, like this:

export NUPIC=/Users/mtaylor/nta/nupic

Now try running the test command again.

HI Matt,

Yep. That was the problem. I had to fight with my
PATH variable a little bit to sort out my Anaconda python from my
MAC OS python. After setting NUPIC, doing the git updates, I ran the unit tests
and everything seems to be ok.

Thank you very much for your patient help,

Phillip

1 Like

A post was split to a new topic: Test_db failure on Ubuntu