It was 1GB…got resolved by increasing the RAM size of VM to 2GB.
Now the installation seems to be success but the test result is giving a couple of errors
I ran py.test tests/unit
================================================================================================= FAILURES =================================================================================================
____________________________________________________________________________ SpatialPoolerTest.testComputeParametersValidation _____________________________________________________________________________
self = <tests.unit.nupic.algorithms.spatial_pooler_cpp_unit_test.SpatialPoolerTest testMethod=testComputeParametersValidation>
def testComputeParametersValidation(self):
sp = SpatialPooler(inputDimensions=[5], columnDimensions=[5])
inputGood = np.ones(5, dtype=uintDType)
outGood = np.zeros(5, dtype=uintDType)
inputBad = np.ones(5, dtype=realDType)
inputBad2D = np.ones((5, 5), dtype=realDType)
outBad = np.zeros(5, dtype=realDType)
outBad2D = np.zeros((5, 5), dtype=realDType)
# Validate good parameters
sp.compute(inputGood, False, outGood)
# Validate bad parameters
with self.assertRaises(RuntimeError):
> sp.compute(inputBad, False, outBad)
E AssertionError: RuntimeError not raised
tests/unit/nupic/algorithms/spatial_pooler_cpp_unit_test.py:195: AssertionError
___________________________________________________________________________________ DateEncoderTest.testHolidayMultiple ____________________________________________________________________________________
self = <tests.unit.nupic.encoders.date_test.DateEncoderTest testMethod=testHolidayMultiple>
def testHolidayMultiple(self):
"""look at holiday more carefully because of the smooth transition"""
# use of forced is not recommended, used here for readability, see
# scalar.py
> e = DateEncoder(holiday=5, forced=True, holidays=[(12, 25), (2018, 4, 1), (2017, 4, 16)])
E TypeError: __init__() got an unexpected keyword argument 'holidays'
tests/unit/nupic/encoders/date_test.py:164: TypeError
______________________________________________________________________________ AnomalyLikelihoodRegionTest.testSerialization _______________________________________________________________________________
self = <tests.unit.nupic.regions.anomaly_likelihood_region_test.AnomalyLikelihoodRegionTest testMethod=testSerialization>
@unittest.skipUnless(
capnp, "pycapnp is not installed, skipping serialization test.")
def testSerialization(self):
""" test to ensure serialization preserves the state of the region
correctly. """
anomalyLikelihoodRegion1 = AnomalyLikelihoodRegion()
inputs = AnomalyLikelihoodRegion.getSpec()['inputs']
outputs = AnomalyLikelihoodRegion.getSpec()['outputs']
parameters = AnomalyLikelihoodRegion.getSpec()['parameters']
# Make sure to calculate distribution by passing the probation period
learningPeriod = parameters['learningPeriod']['defaultValue']
reestimationPeriod = parameters['reestimationPeriod']['defaultValue']
probation = learningPeriod + reestimationPeriod
for _ in xrange(0, probation + 1):
inputs['rawAnomalyScore'] = numpy.array([random.random()])
inputs['metricValue'] = numpy.array([random.random()])
anomalyLikelihoodRegion1.compute(inputs, outputs)
score1 = outputs['anomalyLikelihood'][0]
proto1 = AnomalyLikelihoodRegionProto.new_message()
> anomalyLikelihoodRegion1.write(proto1)
tests/unit/nupic/regions/anomaly_likelihood_region_test.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.local/lib/python2.7/site-packages/nupic/regions/anomaly_likelihood_region.py:139: in write
self.anomalyLikelihood.write(proto)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <nupic.algorithms.anomaly_likelihood.AnomalyLikelihood object at 0x7ff722c59990>
proto = <nupic.regions.AnomalyLikelihoodRegion_capnp:AnomalyLikelihoodRegionProto buil...eriod = 0, learningPeriod = 0, reestimationPeriod = 0, historicWindowSize = 0)>
def write(self, proto):
""" capnp serialization method for the anomaly likelihood object
:param proto: (Object) capnp proto object specified in
nupic.regions.AnomalyLikelihoodRegion.capnp
"""
proto.iteration = self._iteration
pHistScores = proto.init('historicalScores', len(self._historicalScores))
for i, score in enumerate(list(self._historicalScores)):
_, value, anomalyScore = score
record = pHistScores[i]
record.value = float(value)
record.anomalyScore = float(anomalyScore)
if self._distribution:
> proto.distribution.name = self._distribution["distributionParams"]["name"]
E KeyError: 'distributionParams'
../.local/lib/python2.7/site-packages/nupic/algorithms/anomaly_likelihood.py:321: KeyError
========================================================================================== pytest-warning summary ==========================================================================================
WC1 /home/sanjukta/nupic/tests/unit/nupic/engine/network_test.py cannot collect test class 'TestNode' because it has a __init__ constructor
WC1 /home/sanjukta/nupic/tests/unit/nupic/frameworks/opf/htmpredictionmodel_classifier_helper_test.py cannot collect test class 'TestOptionParser' because it has a __init__ constructor
WC1 /home/sanjukta/nupic/tests/unit/nupic/regions/knn_anomaly_classifier_region_test.py cannot collect test class 'TestOptionParser' because it has a __init__ constructor
WC1 /home/sanjukta/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class 'TestParentException' because it has a __init__ constructor
WC1 /home/sanjukta/nupic/tests/unit/nupic/support/decorators_test.py cannot collect test class 'TestChildException' because it has a __init__ constructor
============================================================= 3 failed, 708 passed, 17 skipped, 8 xfailed, 5 pytest-warnings in 732.31 seconds =============================================================
sanjukta@sanjukta-ubuntu16:~/nupic$