Hi all,
I'm having trouble with running run_swarm.py with rec-center-hourly.csv.
I'm using OS X 10.10 and Homebrew python.
I installed nupic from source code and it seemed successful (after I fixed
the setup.py by adding some options to commonLinkFlags as suggested here
<https://github.com/numenta/nupic/issues/1813>.)
However, I keep getting "jobInfo.results: None" error when I run
run_swarm.py.
---------
jobInfo.results: None
EXCEPTION: expected string or buffer
Traceback (most recent call last):
File "run_swarm.py", line 191, in <module>
runPermutations(sys.argv[1:])
File "run_swarm.py", line 182, in runPermutations
fileArgPath, optionsDict, outputLabel, permWorkDir)
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/swarming/permutations_runner.py",
line 308, in runWithJsonFile
verbosity=verbosity)
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/swarming/permutations_runner.py",
line 276, in runWithConfig
return _runAction(runOptions)
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/swarming/permutations_runner.py",
line 217, in _runAction
returnValue = _runHyperSearch(runOptions)
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/swarming/permutations_runner.py",
line 160, in _runHyperSearch
metricsKeys=search.getDiscoveredMetricsKeys())
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/swarming/permutations_runner.py",
line 824, in generateReport
results = json.loads(jobInfo.results)
File
"/usr/local/lib/python2.7/site-packages/nupic-0.2.7.dev0-py2.7-macosx-10.10-x86_64.egg/nupic/support/object_json.py",
line 163, in loads
json.loads(s, object_hook=objectDecoderHook, **kwargs))
File
"/usr/local/Cellar/python/2.7.10/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",
line 351, in loads
return cls(encoding=encoding, **kw).decode(s)
File
"/usr/local/Cellar/python/2.7.10/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
-----------------
It seems to be the same error as this
https://github.com/numenta/nupic/issues/1947 but the solution provided here
("specifying an absolute path to the sine.csv in your search_def.json")
didn't work.
I tried export $NTA_DATA_PATH = "path/to/data/file" as suggested here
https://github.com/numenta/nupic/wiki/Running-Swarms#the-data-file but it
didn't work either.
I thought there might be some file formatting issue in search_def.json
and rec-center-hourly.csv, but it seems fine too.
I initially started with anaconda python and was getting the same error.
After I saw some comments about anaconda python issue with nupic on
numenta/nupic/issues, I uninstalled anaconda and used Homebrew python
instead.
(I tried to install on the system's python, but I got an error regarding
with pycapnp (failed with error code 1 in
/private/tmp/pip-build-bWmOt2/pycapnp and fatal error: 'initializer_list'
file not found) while doing pip install -r requirements.txt, and I couldn't
resolve the issue, so I came back to Homebrew python environment.)
For your information, when I tried NuPIC Geospatial Tracking app, after I
ran ./run.py route.csv (this csv file is from the route simulator), I got a
segmentation fault. It seems that the error occurred when NuPIC runs on
preprocessed_data.csv, which might be related to the cause of the above
swarming error.
./run.py route.csv -v gave the following results.
[showing the last part of the output]
-------------------------------
....
Discarding row: ['simroute', '1437240968000', '-122.23691326404116',
'37.485063672088884', '0', '2.94', '0', '1', '']
Discarding row: ['simroute', '1437240970000', '-122.23691000000001',
'37.485060000000004', '0', '2.94', '0', '1', '']
Discarding row: ['simroute', '1437240972000', '-122.2368664330952',
'37.48502006372207', '0', '2.94', '0', '1', '']
Discarding row: ['simroute', '1437240974000', '-122.23682286621369',
'37.484980127444125', '0', '2.94', '0', '1', '']
Keeping row: ['simroute', '1437240976000', '-122.23677929935548',
'37.48494019116619', '0', '2.94', '0', '1', '']
Running NuPIC on
/Users/yutaro/nupic/nupic.geospatial/output/preprocessed_data.csv...
Model parameters:
{'model': 'CLA', 'version': 1, 'predictAheadTime': None, 'modelParams':
{'sensorParams': {'verbosity': 0, 'encoders': {u'vector': {'scale': 5,
'name': u'vector', 'timestep': 10, 'n': 2048, 'fieldname': u'vector', 'w':
51, 'type': 'GeospatialCoordinateEncoder'}}, 'sensorAutoReset': None},
'clEnable': False, 'spParams': {'columnCount': 2048, 'spVerbosity': 0,
'maxBoost': 1.0, 'spatialImp': 'cpp', 'synPermConnected': 0.1, 'seed':
1956, 'numActiveColumnsPerInhArea': 40, 'globalInhibition': 1,
'inputWidth': 0, 'synPermInactiveDec': 0.0005, 'synPermActiveInc': 0.0001,
'potentialPct': 0.8}, 'spEnable': True, 'clParams': None, 'inferenceType':
'TemporalAnomaly', 'tpEnable': True, 'anomalyParams':
{u'anomalyCacheRecords': None, u'autoDetectThreshold': None,
u'autoDetectWaitRecords': 2184}, 'tpParams': {'columnCount': 2048,
'activationThreshold': 6, 'pamLength': 3, 'cellsPerColumn': 32,
'connectedPerm': 0.5, 'permanenceInc': 0.1, 'minThreshold': 3, 'verbosity':
0, 'maxSynapsesPerSegment': 32, 'outputType': 'normal', 'initialPerm':
0.21, 'globalDecay': 0.0, 'maxAge': 0, 'permanenceDec': 0.1, 'seed': 1960,
'newSynapseCount': 20, 'maxSegmentsPerCell': 128, 'temporalImp': 'cpp',
'inputWidth': 2048}, 'trainSPNetOnlyIfRequested': False}}
Segmentation fault: 11
----------------------------------
I would be really appreciated if you could provide any advice on this.
Best,
Yutaro