Are you following this instruction? https://github.com/numenta/nupic/wiki/Installing-NuPIC-on-Ubuntu --------- Matt Taylor OS Community Flag-Bearer Numenta
On Sat, May 16, 2015 at 9:39 AM, Wakan Tanka <[email protected]> wrote: > On 05/16/2015 06:00 AM, Matthew Taylor wrote: >> >> I'm not convinced you have NuPIC installed properly. How did you >> install it? From source code or with pip? >> --------- >> Matt Taylor >> OS Community Flag-Bearer >> Numenta >> >> >> On Fri, May 15, 2015 at 7:20 PM, Wakan Tanka <[email protected]> wrote: >>> >>> Hello all, >>> newbie here. Here is another explanation for what I've described in >>> "NUPIC >>> variable mess" I think outputs are self explanatory. Problem is that I >>> cannot run run_swarm.py script therfore I am not able to run another >>> examples from youtube/internet. The only thing where run_swarm.py is >>> working >>> is for gym.csv example issued from $NUPIC/nupic directory. Thank you very >>> much >>> >>> >>> >>> ############# >>> # MY CONFIG # >>> ############# >>> marek@ubuntu:~$ echo $PATH >>> >>> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games >>> >>> marek@ubuntu:~$ echo $NUPIC >>> /home/marek/nupic >>> >>> marek@ubuntu:~/experiments/sine-waves$ python -c 'import nupic' >>> marek@ubuntu:~/experiments/sine-waves$ echo $? >>> 0 >>> >>> >>> >>> >>> >>> ############## >>> # EXAMPPLE 1 # >>> ############## >>> >>> ######################################################## >>> # RUNNING SWARM EXAMPLE FROM: # >>> # https://github.com/numenta/nupic/wiki/Running-Swarms # >>> # IT IS NOT WORKING FROM $NUPIC DIRECTORY # >>> ######################################################## >>> >>> >>> marek@ubuntu:~/nupic$ >>> marek@ubuntu:~/nupic$ ll $NUPIC/examples/swarm/simple >>> total 16 >>> drwxrwxr-x 2 marek marek 4096 May 16 03:52 ./ >>> drwxrwxr-x 4 marek marek 4096 May 16 02:33 ../ >>> -rw-rw-r-- 1 marek marek 1169 May 14 03:18 search_def_custom_error.json >>> -rw-rw-r-- 1 marek marek 1058 May 14 03:18 search_def.json >>> >>> marek@ubuntu:~/nupic$ $NUPIC/scripts/run_swarm.py >>> $NUPIC/examples/swarm/simple/search_def.json --maxWorkers=1 >>> >>> Generating experiment files in directory: >>> /home/marek/nupic/examples/swarm/simple... >>> Writing 313 lines... >>> Writing 113 lines... >>> done. >>> None >>> Successfully submitted new HyperSearch job, jobID=1013 >>> Evaluated 0 models >>> HyperSearch finished! >>> Worker completion message: E10003: Exception occurred in Hypersearch >>> Worker: >>> KjException() >>> Traceback (most recent call last): >>> File "/home/marek/nupic/nupic/swarming/HypersearchWorker.py", line >>> 551, in >>> main >>> jobID = hst.run() >>> File "/home/marek/nupic/nupic/swarming/HypersearchWorker.py", line >>> 312, in >>> run >>> cjDAO=cjDAO, jobID=options.jobID, logLevel=options.logLevel) >>> File "nupic/swarming/HypersearchV2.py", line 2577, in __init__ >>> modelDescription, _ = opfhelpers.loadExperiment(self._basePath) >>> File "nupic/frameworks/opf/opfhelpers.py", line 46, in loadExperiment >>> descriptionPyModule = loadExperimentDescriptionScriptFromDir(path) >>> File "nupic/frameworks/opf/opfhelpers.py", line 60, in >>> loadExperimentDescriptionScriptFromDir >>> module = _loadDescriptionFile(descriptionScriptPath) >>> File "nupic/frameworks/opf/opfhelpers.py", line 92, in >>> _loadDescriptionFile >>> descriptionPyPath) >>> File "/tmp/tmpKHoW4G/description.py", line 37, in <module> >>> File "nupic/frameworks/opf/clamodelcallbacks.py", line 29, in <module> >>> from clamodel import CLAModel >>> File "nupic/frameworks/opf/clamodel.py", line 44, in <module> >>> from nupic.encoders import MultiEncoder, DeltaEncoder >>> File "nupic/encoders/__init__.py", line 34, in <module> >>> from multi import MultiEncoder >>> File "nupic/encoders/multi.py", line 40, in <module> >>> from nupic.encoders.scalar_capnp import ScalarEncoderProto >>> File "capnp/lib/capnp.pyx", line 3773, in >>> capnp.lib.capnp._Loader.load_module (capnp/lib/capnp.cpp:71749) >>> module = load(self.path, fullname, imports=imports) >>> File "capnp/lib/capnp.pyx", line 3752, in capnp.lib.capnp.load >>> (capnp/lib/capnp.cpp:71239) >>> return _global_schema_parser.load(file_name, display_name, imports) >>> File "capnp/lib/capnp.pyx", line 3126, in >>> capnp.lib.capnp.SchemaParser.load (capnp/lib/capnp.cpp:63334) >>> fileSchema = parser._parse_disk_file(display_name, file_name, >>> imports) >>> KjException: /home/marek/nupic/nupic/encoders/scalar.capnp:0: failed: >>> Duplicate ID @0xfa7d16f86048a6e4. >>> stack: 0x7f671de443f8 0x7f671dd66329 0x7f671dd65e75 0x7f671dd8be6a >>> 0x7f671dd8c3a2 0x7f671dd90796 0x7f671dd9088b 0x7f671dd90de9 >>> 0x7f671dd90e28 >>> 0x7f671dd6529e 0x7f671dd6538b 0x7f671dd15b98 0x7f671dd05b96 >>> 0x7f671dce723f >>> 0x7f671dcba54f 0x7f671dcdfbca >>> >>> >>> Results from all experiments: >>> ---------------------------------------------------------------- >>> Generating experiment files in directory: /tmp/tmpZ6eLDn... >>> Writing 313 lines... >>> Writing 113 lines... >>> done. >>> None >>> Traceback (most recent call last): >>> File "/home/marek/nupic/scripts/run_swarm.py", line 187, in <module> >>> runPermutations(sys.argv[1:]) >>> File "/home/marek/nupic/scripts/run_swarm.py", line 178, in >>> runPermutations >>> fileArgPath, optionsDict, outputLabel, permWorkDir) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 309, in runWithJsonFile >>> verbosity=verbosity) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 276, in runWithConfig >>> return _runAction(runOptions) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 217, in _runAction >>> returnValue = _runHyperSearch(runOptions) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 160, in _runHyperSearch >>> metricsKeys=search.getDiscoveredMetricsKeys()) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 822, in generateReport >>> raise Exception(jobInfo.workerCompletionMsg) >>> Exception: E10003: Exception occurred in Hypersearch Worker: >>> KjException() >>> Traceback (most recent call last): >>> File "/home/marek/nupic/nupic/swarming/HypersearchWorker.py", line >>> 551, in >>> main >>> jobID = hst.run() >>> File "/home/marek/nupic/nupic/swarming/HypersearchWorker.py", line >>> 312, in >>> run >>> cjDAO=cjDAO, jobID=options.jobID, logLevel=options.logLevel) >>> File "nupic/swarming/HypersearchV2.py", line 2577, in __init__ >>> modelDescription, _ = opfhelpers.loadExperiment(self._basePath) >>> File "nupic/frameworks/opf/opfhelpers.py", line 46, in loadExperiment >>> descriptionPyModule = loadExperimentDescriptionScriptFromDir(path) >>> File "nupic/frameworks/opf/opfhelpers.py", line 60, in >>> loadExperimentDescriptionScriptFromDir >>> module = _loadDescriptionFile(descriptionScriptPath) >>> File "nupic/frameworks/opf/opfhelpers.py", line 92, in >>> _loadDescriptionFile >>> descriptionPyPath) >>> File "/tmp/tmpKHoW4G/description.py", line 37, in <module> >>> File "nupic/frameworks/opf/clamodelcallbacks.py", line 29, in <module> >>> from clamodel import CLAModel >>> File "nupic/frameworks/opf/clamodel.py", line 44, in <module> >>> from nupic.encoders import MultiEncoder, DeltaEncoder >>> File "nupic/encoders/__init__.py", line 34, in <module> >>> from multi import MultiEncoder >>> File "nupic/encoders/multi.py", line 40, in <module> >>> from nupic.encoders.scalar_capnp import ScalarEncoderProto >>> File "capnp/lib/capnp.pyx", line 3773, in >>> capnp.lib.capnp._Loader.load_module (capnp/lib/capnp.cpp:71749) >>> module = load(self.path, fullname, imports=imports) >>> File "capnp/lib/capnp.pyx", line 3752, in capnp.lib.capnp.load >>> (capnp/lib/capnp.cpp:71239) >>> return _global_schema_parser.load(file_name, display_name, imports) >>> File "capnp/lib/capnp.pyx", line 3126, in >>> capnp.lib.capnp.SchemaParser.load (capnp/lib/capnp.cpp:63334) >>> fileSchema = parser._parse_disk_file(display_name, file_name, >>> imports) >>> KjException: /home/marek/nupic/nupic/encoders/scalar.capnp:0: failed: >>> Duplicate ID @0xfa7d16f86048a6e4. >>> stack: 0x7f671de443f8 0x7f671dd66329 0x7f671dd65e75 0x7f671dd8be6a >>> 0x7f671dd8c3a2 0x7f671dd90796 0x7f671dd9088b 0x7f671dd90de9 >>> 0x7f671dd90e28 >>> 0x7f671dd6529e 0x7f671dd6538b 0x7f671dd15b98 0x7f671dd05b96 >>> 0x7f671dce723f >>> 0x7f671dcba54f 0x7f671dcdfbca >>> >>> >>> ################################################# >>> # DELETING CREATED FILES AND CD TO $NUPIC/nupic # >>> # THIS IS WORKING OUTPUT IS ON URL # >>> ################################################# >>> >>> marek@ubuntu:~/nupic$ cd nupic >>> marek@ubuntu:~/nupic/nupic$ rm >>> $NUPIC/examples/swarm/simple/description.py* >>> marek@ubuntu:~/nupic/nupic$ rm >>> $NUPIC/examples/swarm/simple/permutations.py >>> marek@ubuntu:~/nupic/nupic$ rm >>> $NUPIC/examples/swarm/simple/search_def_HyperSearchJobID.pkl >>> marek@ubuntu:~/nupic/nupic$ rm >>> $NUPIC/examples/swarm/simple/search_def_Report.csv >>> rm: cannot remove >>> ‘/home/marek/nupic/examples/swarm/simple/search_def_Report.csv’: No such >>> file or directory >>> marek@ubuntu:~/nupic/nupic$ rm -rf $NUPIC/examples/swarm/simple/model_0/ >>> >>> marek@ubuntu:~/nupic/nupic$ ll $NUPIC/examples/swarm/simple >>> total 16 >>> drwxrwxr-x 2 marek marek 4096 May 16 04:01 ./ >>> drwxrwxr-x 4 marek marek 4096 May 16 02:33 ../ >>> -rw-rw-r-- 1 marek marek 1169 May 14 03:18 search_def_custom_error.json >>> -rw-rw-r-- 1 marek marek 1058 May 14 03:18 search_def.json >>> >>> marek@ubuntu:~/nupic/nupic$ $NUPIC/scripts/run_swarm.py >>> $NUPIC/examples/swarm/simple/search_def.json --maxWorkers=1 2>&1 | tee >>> /tmp/swarm_ok >>> >>> # HERE IS SUCCESSFUL OUTPUT (A BIT LONG): >>> http://termbin.com/f065 >>> >>> >>> >>> >>> >>> >>> ############## >>> # EXAMPPLE 2 # >>> ############## >>> >>> >>> ################## >>> # FILES FOR DEMO # >>> ################## >>> >>> marek@ubuntu:~/experiments/sine-waves$ pwd >>> /home/marek/experiments/sine-waves >>> >>> marek@ubuntu:~/experiments/sine-waves$ ll >>> total 136 >>> drwxrwxr-x 2 marek marek 4096 May 16 00:39 ./ >>> drwxrwxr-x 4 marek marek 4096 May 15 23:56 ../ >>> -rw-rw-r-- 1 marek marek 1608 May 16 00:02 generate_data.py >>> -rw-rw-r-- 1 marek marek 528 May 16 00:39 search_def.json >>> -rw-rw-r-- 1 marek marek 39014 May 16 00:03 sine100.csv >>> -rw-rw-r-- 1 marek marek 38722 May 16 00:02 sine50.csv >>> -rw-rw-r-- 1 marek marek 39014 May 16 00:18 sine.csv >>> >>> marek@ubuntu:~/experiments/sine-waves$ cat search_def.json >>> { >>> "includedFields": [ >>> { >>> "fieldName": "sine", >>> "fieldType": "float", >>> "maxValue": "1.0", >>> "minValue": "-1.0" >>> } >>> ], >>> "streamDef": { >>> "info": "sine", >>> "version": 1, >>> "streams": [ >>> { >>> "info": "sine.csv", >>> "source": "file://sine.csv", >>> "columns": [ >>> "*" >>> ] >>> } >>> ] >>> }, >>> "inferenceType": "TemporalAnomaly", >>> "inferenceArgs": { >>> "predictionSteps": [ >>> 1 >>> ], >>> "predictedField": "sine" >>> }, >>> "swarmSize": "medium" >>> } >>> >>> marek@ubuntu:~/experiments/sine-waves$ head sine.csv >>> angle,sine >>> float,float >>> , >>> 0.0,0.0 >>> 0.031415926535897934,0.03141075907812829 >>> 0.06283185307179587,0.06279051952931337 >>> 0.09424777960769379,0.09410831331851431 >>> 0.12566370614359174,0.12533323356430426 >>> 0.15707963267948966,0.15643446504023087 >>> 0.18849555921538758,0.1873813145857246 >>> >>> >>> >>> >>> >>> ################################################################## >>> # TRYING TO RUN DEMO FROM THE SAME DIR AS DEMO FILES GIVES ERROR # >>> ################################################################## >>> >>> marek@ubuntu:~/experiments/sine-waves$ $NUPIC/scripts/run_swarm.py >>> /home/marek/experiments/sine-waves/search_def.json --maxWorkers=1 >>> Traceback (most recent call last): >>> File "/home/marek/nupic/scripts/run_swarm.py", line 187, in <module> >>> runPermutations(sys.argv[1:]) >>> File "/home/marek/nupic/scripts/run_swarm.py", line 178, in >>> runPermutations >>> fileArgPath, optionsDict, outputLabel, permWorkDir) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 309, in runWithJsonFile >>> verbosity=verbosity) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 266, in runWithConfig >>> _generateExpFilesFromSwarmDescription(swarmConfig, outDir) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 197, in _generateExpFilesFromSwarmDescription >>> "--outDir=%s" % (outDir)]) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 2027, in expGenerator >>> claDescriptionTemplateFile = options.claDescriptionTemplateFile) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 191, in _handleDescriptionOption >>> claDescriptionTemplateFile = claDescriptionTemplateFile) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 1077, in _generateExperiment >>> "%s\nOPTION ARG=%s") % (str(e), pprint.pformat(options))) >>> >>> nupic.frameworks.opf.exp_generator.ExpGenerator._InvalidCommandArgException: >>> JSON arg validation failed for option --description: Failed to validate >>> field 'includedFields' list schema: Value u'1.0' for field 'maxValue' is >>> not >>> of type number >>> OPTION ARG={u'includedFields': [{u'fieldName': u'sine', >>> u'fieldType': u'float', >>> u'maxValue': u'1.0', >>> u'minValue': u'-1.0'}], >>> u'inferenceArgs': {u'predictedField': u'sine', u'predictionSteps': >>> [1]}, >>> u'inferenceType': u'TemporalAnomaly', >>> u'streamDef': {u'info': u'sine', >>> u'streams': [{u'columns': [u'*'], >>> u'info': u'sine.csv', >>> u'source': u'file://sine.csv'}], >>> u'version': 1}, >>> u'swarmSize': u'medium'} >>> >>> >>> >>> >>> >>> ##################################################### >>> # TRYING TO RUN DEMO FROM $NUPIC/nupic DIR WITH # >>> # FULL PATH TO source INSIDE # search_def.json # >>> # GIVES ALSO ERROR # >>> ##################################################### >>> >>> marek@ubuntu:~/nupic/nupic$ $NUPIC/scripts/run_swarm.py >>> /home/marek/experiments/sine-waves/search_def.json --maxWorkers=1 >>> Traceback (most recent call last): >>> File "/home/marek/nupic/scripts/run_swarm.py", line 187, in <module> >>> runPermutations(sys.argv[1:]) >>> File "/home/marek/nupic/scripts/run_swarm.py", line 178, in >>> runPermutations >>> fileArgPath, optionsDict, outputLabel, permWorkDir) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 309, in runWithJsonFile >>> verbosity=verbosity) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 266, in runWithConfig >>> _generateExpFilesFromSwarmDescription(swarmConfig, outDir) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/swarming/permutations_runner.py", >>> line 197, in _generateExpFilesFromSwarmDescription >>> "--outDir=%s" % (outDir)]) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 2027, in expGenerator >>> claDescriptionTemplateFile = options.claDescriptionTemplateFile) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 191, in _handleDescriptionOption >>> claDescriptionTemplateFile = claDescriptionTemplateFile) >>> File >>> >>> "/home/marek/.local/lib/python2.7/site-packages/nupic-0.3.0.dev0-py2.7-linux-x86_64.egg/nupic/frameworks/opf/exp_generator/ExpGenerator.py", >>> line 1077, in _generateExperiment >>> "%s\nOPTION ARG=%s") % (str(e), pprint.pformat(options))) >>> >>> nupic.frameworks.opf.exp_generator.ExpGenerator._InvalidCommandArgException: >>> JSON arg validation failed for option --description: Failed to validate >>> field 'includedFields' list schema: Value u'1.0' for field 'maxValue' is >>> not >>> of type number >>> OPTION ARG={u'includedFields': [{u'fieldName': u'sine', >>> u'fieldType': u'float', >>> u'maxValue': u'1.0', >>> u'minValue': u'-1.0'}], >>> u'inferenceArgs': {u'predictedField': u'sine', u'predictionSteps': >>> [1]}, >>> u'inferenceType': u'TemporalAnomaly', >>> u'streamDef': {u'info': u'sine', >>> u'streams': [{u'columns': [u'*'], >>> u'info': u'sine.csv', >>> u'source': >>> u'file:/home/marek/experiments/sine-waves/sine.csv'}], >>> u'version': 1}, >>> u'swarmSize': u'medium'} >>> >>> >>> >>> >>> >>> >>> >>> >> > > It is on Ubuntu 14.04.2 LTS can you recommend some action for reinstalling > or somethign that might help. Firstly I was trying to build it on Debian but > no luck. So I've set up Ubuntu for that. in virtual machine. > > Thank you >
