{"action":"opened","issue":{"url":"https://api.github.com/repos/numenta/nupic/issues/1947","labels_url":"https://api.github.com/repos/numenta/nupic/issues/1947/labels{/name}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/1947/comments","events_url":"https://api.github.com/repos/numenta/nupic/issues/1947/events","html_url":"https://github.com/numenta/nupic/issues/1947","id":64089291,"number":1947,"title":"Swarming returns JSON error when NUPIC environment variable is unset","user":{"login":"rhyolight","id":15566,"avatar_url":"https://avatars.githubusercontent.com/u/15566?v=3","gravatar_id":"","url":"https://api.github.com/users/rhyolight","html_url":"https://github.com/rhyolight","followers_url":"https://api.github.com/users/rhyolight/followers","following_url":"https://api.github.com/users/rhyolight/following{/other_user}","gists_url":"https://api.github.com/users/rhyolight/gists{/gist_id}","starred_url":"https://api.github.com/users/rhyolight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhyolight/subscriptions","organizations_url":"https://api.github.com/users/rhyolight/orgs","repos_url":"https://api.github.com/users/rhyolight/repos","events_url":"https://api.github.com/users/rhyolight/events{/privacy}","received_events_url":"https://api.github.com/users/rhyolight/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-24T20:14:15Z","updated_at":"2015-03-24T20:14:15Z","closed_at":null,"body":"To replicate:\r\n\r\n1. install nupic from source following README instructions\r\n1. `cd examples/opf/clients/hotgym/prediction/one_gym`\r\n1. `unset NUPIC` (if set)\r\n1. `python swarm.py`\r\n\r\nError:\r\n\r\n```\r\n∙ ./swarm.py\r\nThis script runs a swarm on the input data (rec-center-hourly.csv) and\r\ncreates a model parameters file in the `model_params` directory containing\r\nthe best model found by the swarm. Dumps a bunch of crud to stdout because\r\nthat is just what swarming does at this point. You really don't need to\r\npay any attention to it.\r\n\r\n=================================================\r\n= Swarming on rec-center-hourly data...\r\n= Medium swarm. Sit back and relax, this could take awhile.\r\n=================================================\r\nGenerating experiment files in directory: /Users/mtaylor/nta/nupic/examples/opf/clients/hotgym/prediction/one_gym/swarm...\r\nWriting  313 lines...\r\nWriting  113 lines...\r\ndone.\r\nNone\r\nSuccessfully submitted new HyperSearch job, jobID=1411\r\nEvaluated 0 models\r\nHyperSearch finished!\r\nWorker completion message: None\r\n\r\nResults from all experiments:\r\n----------------------------------------------------------------\r\nGenerating experiment files in directory: /var/folders/c1/fc9tt93s2p5b9d3wp185qxwc0000gn/T/tmp6234aw...\r\nWriting  313 lines...\r\nWriting  113 lines...\r\ndone.\r\nNone\r\njson.loads(jobInfo.results) raised an exception.  Here is some info to help with debugging:\r\njobInfo:  _jobInfoNamedTuple(jobId=1411, client=u'GRP', clientInfo=u'', clientKey=u'', cmdLine=u'$HYPERSEARCH', params=u'{\"hsVersion\": \"v2\", \"maxModels\": null, \"persistentJobGUID\": \"0d6edaa1-d262-11e4-94c6-600308a99116\", \"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='\\ro\\x9b\\xd4\\xd2b\\x11\\xe4\\xa0\\xfa`\\x03\\x08\\xa9\\x91\\x16', 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, 3, 24, 20, 12, 10), engCjmConnId=None, engWorkerState=None, engStatus=None, engModelMilestones=None)\r\njobInfo.results:  None\r\nEXCEPTION:  expected string or buffer\r\nTraceback (most recent call last):\r\n  File \"./swarm.py\", line 109, in <module>\r\n    swarm(INPUT_FILE)\r\n  File \"./swarm.py\", line 101, in swarm\r\n    modelParams = swarmForBestModelParams(SWARM_DESCRIPTION, name)\r\n  File \"./swarm.py\", line 78, in swarmForBestModelParams\r\n    verbosity=0\r\n  File \"/Users/mtaylor/nta/nupic/nupic/swarming/permutations_runner.py\", line 276, in runWithConfig\r\n    return _runAction(runOptions)\r\n  File \"/Users/mtaylor/nta/nupic/nupic/swarming/permutations_runner.py\", line 217, in _runAction\r\n    returnValue = _runHyperSearch(runOptions)\r\n  File \"/Users/mtaylor/nta/nupic/nupic/swarming/permutations_runner.py\", line 160, in _runHyperSearch\r\n    metricsKeys=search.getDiscoveredMetricsKeys())\r\n  File \"/Users/mtaylor/nta/nupic/nupic/swarming/permutations_runner.py\", line 825, in generateReport\r\n    results = json.loads(jobInfo.results)\r\n  File \"/Users/mtaylor/nta/nupic/nupic/support/object_json.py\", line 163, in loads\r\n    json.loads(s, object_hook=objectDecoderHook, **kwargs))\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py\", line 351, in loads\r\n    return cls(encoding=encoding, **kw).decode(s)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py\", line 365, in decode\r\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\r\nTypeError: expected string or buffer\r\n```\r\n\r\nCC @pehlert"}}