Hi all,
I followed the instructions for installing Nupic on Ubuntu (https://github.com/numenta/nupic/wiki/Installing-NuPIC-on-Ubuntu) and ran into a couple of issues which I resolved by setting up the PYTHONPATH, NUPIC, and NTA environment variables.
However, I eventually got stuck when running the Python tests and here is what I'm getting:
tests/unit/py2/nupic/engine/network_test.py:32: NetworkTest.testErrorHandling FAILED
======================================================================= FAILURES =======================================================================
____________________________________________________________ NetworkTest.testErrorHandling _____________________________________________________________
self = <tests.unit.py2.nupic.engine.network_test.NetworkTest testMethod=testErrorHandling>
def testErrorHandling(self):
n = engine.Network()
# Test trying to add non-existent node
with self.assertRaises(Exception) as cm:
n.addRegion('r', 'py.NonExistingNode', '')
self.assertEqual(cm.exception.message,
"Matching Python module for " +
"py.NonExistingNode not found.")
# Test failure during import
with self.assertRaises(Exception) as cm:
n.addRegion('r', 'py.UnimportableNode', '')
self.assertEqual(str(cm.exception),
'invalid syntax (UnimportableNode.py, line 5)')
# Test failure in the __init__() method
with self.assertRaises(Exception) as cm:
n.addRegion('r', 'py.TestNode', '{ failInInit: 1 }')
self.assertEqual(str(cm.exception),
'TestNode.__init__() Failing on purpose as requested')
# Test failure inside the compute() method
with self.assertRaises(Exception) as cm:
r = n.addRegion('r', 'py.TestNode', '{ failInCompute: 1 }')
r.dimensions = engine.Dimensions([4, 4])
n.initialize()
n.run(1)
self.assertEqual(str(cm.exception),
> 'TestNode.compute() Failing on purpose as requested')
E AssertionError: "Wrong number of arguments for overloaded function 'new_Dimensions'.\n Possible C/C++ prototypes are:\n nta::Dimensions()\n nta::Dimensions(std::vector< size_t,std::allocator< size_t > >)\n nta::Dimensions(size_t)\n nta::Dimensions(size_t,size_t)\n nta::Dimensions(size_t,size_t,size_t)\n" != 'TestNode.compute() Failing on purpose as requested'
tests/unit/py2/nupic/engine/network_test.py:65: AssertionError
------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------
ERROR: Matching Python module for py.NonExistingNode not found. [/home/mariam/nupic/nta/engine/RegionImplFactory.cpp line 450]
ERROR: Could not get valid spec for Region: py.UnimportableNode [/home/mariam/nupic/nta/engine/RegionImplFactory.cpp line 446]
{'singleNodeOnly': False, 'inputs': {'bottomUpIn': {'count': 0, 'requireSplitterMap': True, 'description': 'Primary input for the node', 'isDefaultInput': True, 'dataType': 'Real64', 'required': True, 'regionLevel': False}}, 'commands': {}, 'description': 'The node spec of the NuPIC 2 Python TestNode', 'parameters': {'failInCompute': {'count': 1, 'description': 'For testing failure in compute()', 'dataType': 'Int32', 'accessMode': 'ReadWrite', 'defaultValue': '0', 'constraints': ''}, 'stringParam': {'count': 0, 'description': 'String parameter', 'dataType': 'Byte', 'accessMode': 'ReadWrite', 'defaultValue': 'nodespec value', 'constraints': ''}, 'real32Param': {'count': 1, 'description': 'Real32 scalar parameter', 'dataType': 'Real32', 'accessMode': 'ReadWrite', 'defaultValue': '32.1', 'constraints': ''}, 'failInInit': {'count': 1, 'description': 'For testing failure in __init__()', 'dataType': 'Int32', 'accessMode': 'ReadWrite', 'defaultValue': '0', 'constraints': ''}, 'uint32Param': {'count': 1, 'description': 'UInt32 scalar parameter', 'dataType': 'UInt32', 'accessMode': 'ReadWrite', 'defaultValue': '33', 'constraints': ''}, 'int32Param': {'count': 1, 'description': 'Int32 scalar parameter', 'dataType': 'Int32', 'accessMode': 'ReadWrite', 'defaultValue': '32', 'constraints': ''}, 'uint64Param': {'count': 1, 'description': 'UInt64 scalar parameter', 'dataType': 'UInt64', 'accessMode': 'ReadWrite', 'defaultValue': '65', 'constraints': ''}, 'int64arrayParam': {'count': 0, 'description': 'Int64 array parameter', 'dataType': 'Int64', 'accessMode': 'ReadWrite', 'defaultValue': '', 'constraints': ''}, 'int64Param': {'count': 1, 'description': 'Int64 scalar parameter', 'dataType': 'Int64', 'accessMode': 'ReadWrite', 'defaultValue': '64', 'constraints': ''}, 'real64Param': {'count': 1, 'description': 'Real64 scalar parameter', 'dataType': 'Real64', 'accessMode': 'ReadWrite', 'defaultValue': '64.1', 'constraints': ''}, 'real32arrayParam': {'count': 0, 'description': 'Real32 array parameter', 'dataType': 'Real32', 'accessMode': 'ReadWrite', 'defaultValue': '', 'constraints': ''}}, 'outputs': {'bottomUpOut': {'count': 0, 'dataType': 'Real64', 'isDefaultOutput': True, 'regionLevel': False, 'description': 'Primary output for the node'}}}
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 1 failed, 153 passed, 6 skipped in 22.18 seconds ==
Was wondering if anybody has any solution for this issue. My Python version is 2.7 could that be the source of problem? In other words does Nupic strictly require Python 2.6 or it's fine with 2.7 too?
type:bug type:tests