Hi,
I have tried to get the hot gym prediction tutorial to run for quite some time.
First it was a surprise that I needed MySQL to do the swarming, now I get this output after finally installing the needed software:
This script runs a swarm on the input data (rec-center-hourly.csv) and
creates a model parameters file in themodel_params
directory containing
the best model found by the swarm. Dumps a bunch of crud to stdout because
that is just what swarming does at this point. You really don’t need to
pay any attention to it.
=================================================
= Swarming on rec-center-hourly data…
= Medium swarm. Sit back and relax, this could take awhile.Generating experiment files in directory: /Users/martinlu/Downloads/nupic/nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm…
Writing 312 lines…
Writing 114 lines…
done.
None
Successfully submitted new HyperSearch job, jobID=1009
Evaluated 0 models
HyperSearch finished!
Worker completion message: None
Results from all experiments:
Generating experiment files in directory: /var/folders/mn/4llfqs0j1hldlkl4m5rzyqth0000gp/T/tmp4KexIU…
Writing 312 lines…
Writing 114 lines…
done.
None
json.loads(jobInfo.results) raised an exception. Here is some info to help with debugging:
jobInfo: _jobInfoNamedTuple(jobId=1009, client=u’GRP’, clientInfo=u’‘, clientKey=u’‘, cmdLine=u’$HYPERSEARCH’, params=u’{“hsVersion”: “v2”, “maxModels”: null, “persistentJobGUID”: “5c73c1ca-e3b4-11e6-9608-5cf9388f078e”, “useTerminators”: false, “description”: {“inferenceArgs”: {“predictionSteps”: [1], “predictedField”: “kw_energy_consumption”}, “iterationCount”: -1, “swarmSize”: “medium”, “includedFields”: [{“fieldName”: “timestamp”, “fieldType”: “datetime”}, {“minValue”: 0.0, “fieldName”: “kw_energy_consumption”, “fieldType”: “float”, “maxValue”: 53.0}], “streamDef”: {“info”: “kw_energy_consumption”, “version”: 1, “streams”: [{“info”: “Rec Center”, “source”: “file://rec-center-hourly.csv”, “columns”: [“*”]}]}, “inferenceType”: “TemporalMultiStep”}}‘, jobHash=’\ui8\xe3\xb4\x11\xe6\x83\xdd\\xf98\x8f\x07\x8e’, status=u’notStarted’, completionReason=None, completionMsg=None, workerCompletionReason=u’success’, workerCompletionMsg=None, cancel=0, startTime=None, endTime=None, results=None, engJobType=u’hypersearch’, minimumWorkers=1, maximumWorkers=4, priority=0, engAllocateNewWorkers=1, engUntendedDeadWorkers=0, numFailedWorkers=0, lastFailedWorkerErrorMsg=None, engCleaningStatus=u’notdone’, genBaseDescription=None, genPermutations=None, engLastUpdateTime=datetime.datetime(2017, 1, 26, 10, 44, 6), engCjmConnId=None, engWorkerState=None, engStatus=None, engModelMilestones=None)
jobInfo.results: None
EXCEPTION: expected string or buffer
Traceback (most recent call last):
File “swarm.py”, line 108, in
swarm(INPUT_FILE)
File “swarm.py”, line 100, in swarm
modelParams = swarmForBestModelParams(SWARM_DESCRIPTION, name)
File “swarm.py”, line 77, in swarmForBestModelParams
verbosity=1
File “/Users/martinlu/Downloads/nupic/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 271, in runWithConfig
return _runAction(runOptions)
File “/Users/martinlu/Downloads/nupic/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 212, in _runAction
returnValue = _runHyperSearch(runOptions)
File “/Users/martinlu/Downloads/nupic/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 155, in _runHyperSearch
metricsKeys=search.getDiscoveredMetricsKeys())
File “/Users/martinlu/Downloads/nupic/lib/python2.7/site-packages/nupic/swarming/permutations_runner.py”, line 822, in generateReport
results = json.loads(jobInfo.results)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
TypeError: expected string or buffer
Here are the steps to replicate, just paste line by line:
sudo pip install virtualenv
virtualenv nupic
cd nupic
./bin/pip install --upgrade pip
./bin/pip install nupic
git clone GitHub - numenta/nupic-legacy: Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
cd nupic/examples/opf/clients/hotgym/prediction/one_gym/
curl https://download.docker.com/mac/stable/Docker.dmg -o docker.dmg && open docker.dmg
docker run --name nupic-mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -p 3306:3306 -d mysql:5.6
…/…/…/…/…/…/…/bin/python …/…/…/…/…/swarm/test_db.py
…/…/…/…/…/…/…/bin/python swarm.py
I also tried to run the simple script:
…/…/…/…/…/…/bin/python hotgym.py
but that gave the error:
ERR: Unknown parameter ‘boostStrength’ for region ‘SP’ of type ‘py.SPRegion’
As you can see there are no modifications to any of the code.
Any ideas on how do I get the tutorial to run?