Can you try setting the NUPIC environment variable? There is an issue
about this: https://github.com/numenta/nupic/issues/1947
---------
Matt Taylor
OS Community Flag-Bearer
Numenta


On Thu, Apr 23, 2015 at 2:05 AM, Tom Tan <[email protected]> wrote:
> Installed MySQL and got pass first issue.  Ran into another exception when
> executing hotgym/prediction/one_gym/swarm.py
>
>
>
> =================================================
> = Swarming on rec-center-hourly data...
> = Medium swarm. Sit back and relax, this could take awhile.
> =================================================
> Generating experiment files in directory:
> /Users/ttan/workspace/nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm...
> Writing  313 lines...
> Writing  113 lines...
> done.
> None
> Successfully submitted new HyperSearch job, jobID=1003
> Evaluated 0 models
> HyperSearch finished!
> Worker completion message: None
>
> Results from all experiments:
> ----------------------------------------------------------------
> Generating experiment files in directory:
> /var/folders/5h/4c4qlvqs63d43lbl4xpwgj3c0000gn/T/tmpk1FqiK...
> Writing  313 lines...
> Writing  113 lines...
> done.
> None
> json.loads(jobInfo.results) raised an exception.  Here is some info to help
> with debugging:
> jobInfo:  _jobInfoNamedTuple(jobId=1003, client=u'GRP', clientInfo=u'',
> clientKey=u'', cmdLine=u'$HYPERSEARCH', params=u'{"hsVersion": "v2",
> "maxModels": null, "persistentJobGUID":
> "a3d332eb-e980-11e4-8795-b8e8562db964", "useTerminators": false,
> "description": {"includedFields": [{"fieldName": "timestamp", "fieldType":
> "datetime"}, {"maxValue": 53.0, "fieldName": "kw_energy_consumption",
> "fieldType": "float", "minValue": 0.0}], "streamDef": {"info":
> "kw_energy_consumption", "version": 1, "streams": [{"info": "Rec Center",
> "source": "file://rec-center-hourly.csv", "columns": ["*"]}]},
> "inferenceType": "TemporalMultiStep", "inferenceArgs": {"predictionSteps":
> [1], "predictedField": "kw_energy_consumption"}, "iterationCount": -1,
> "swarmSize": "medium"}}',
> jobHash='\xa3\xd4;\xd7\xe9\x80\x11\xe4\xa4,\xb8\xe8V-\xb9d',
> 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(2015, 4, 23, 6, 19, 4),
> 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 109, in <module>
>     swarm(INPUT_FILE)
>   File "./swarm.py", line 101, in swarm
>     modelParams = swarmForBestModelParams(SWARM_DESCRIPTION, name)
>   File "./swarm.py", line 78, in swarmForBestModelParams
>     verbosity=0
>   File
> "/Users/ttan/Library/Python/2.7/lib/python/site-packages/nupic/swarming/permutations_runner.py",
> line 276, in runWithConfig
>     return _runAction(runOptions)
>   File
> "/Users/ttan/Library/Python/2.7/lib/python/site-packages/nupic/swarming/permutations_runner.py",
> line 217, in _runAction
>     returnValue = _runHyperSearch(runOptions)
>   File
> "/Users/ttan/Library/Python/2.7/lib/python/site-packages/nupic/swarming/permutations_runner.py",
> line 160, in _runHyperSearch
>     metricsKeys=search.getDiscoveredMetricsKeys())
>   File
> "/Users/ttan/Library/Python/2.7/lib/python/site-packages/nupic/swarming/permutations_runner.py",
> line 825, in generateReport
>     results = json.loads(jobInfo.results)
>   File
> "/Users/ttan/Library/Python/2.7/lib/python/site-packages/nupic/support/object_json.py",
> line 163, in loads
>     json.loads(s, object_hook=objectDecoderHook, **kwargs))
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",
> line 351, in loads
>     return cls(encoding=encoding, **kw).decode(s)
>   File
> "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",
> line 365, in decode
>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
> TypeError: expected string or buffer
>
>
>
>
> On Apr 22, 2015, at 3:40 PM, Tom Tan <[email protected]> wrote:
>
> I am running on Mac OS.
>
>
> On Apr 22, 2015, at 3:39 PM, Tom Tan <[email protected]> wrote:
>
> Hi,
>
> I tried to follow the tutorial and run the “one hot gym” example.  Got
> following error when running swarm.py
>
>   File "/Library/Python/2.7/site-packages/pymysql/__init__.py", line 88, in
> Connect
>     return Connection(*args, **kwargs)
>   File "/Library/Python/2.7/site-packages/pymysql/connections.py", line 626,
> in __init__
>     self._connect()
>   File "/Library/Python/2.7/site-packages/pymysql/connections.py", line 818,
> in _connect
>     2003, "Can't connect to MySQL server on %r (%s)" % (self.host, e))
> pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on
> 'localhost' ([Errno 61] Connection refused)”)
>
>
> Seems MySQL is required?  If so, any DB scripts to create schema etc?
>
> Regards,
> Tom
>
>
>
>

Reply via email to