After an update of my nupic installation on Ubuntu 16.04, I get the error (output listed below) when trying to do swarming on the same file that worked successfully on earlier nupic version.
I have double-checked the following:
mySQL is working as it should reporting success, using:
OneHotGym demo works as intended:
tatulec@UbuntuHP:~$ python nupic/examples/opf/clients/hotgym/simple/hotgym.py
INFO:main:After 100 records, 1-step altMAPE=24.259312
INFO:main:After 200 records, 1-step altMAPE=17.637056
checking the version of nupic & nupic.bindings returns:
The error output from the console follows:
tatulec@UbuntuHP:~/htm/tatumig$ python swarm.py -r 4500 Generating experiment files in directory: /home/tatulec/htm/tatumig/migrainedata_swarm... Writing 312 lines... Writing 114 lines... done. None Successfully submitted new HyperSearch job, jobID=1033 <jobID: 1033> 1 models finished [success: 0; eof: 0; stopped: 0; killed: 0; ERROR: 1; ORPHANED: 0; unknown: 0] ERROR MESSAGE: Exception occurred while running model 5201: RuntimeError("Unknown parameter 'maxBoost' for region 'SP' of type 'py.SPRegion'\nValid parameters are:\n stimulusThreshold\n columnCount\n potentialRadius\n learningMode\n spLearningStatsStr\n spatialImp\n topDownMode\n activeOutputCount\n breakPdb\n breakKomodo\n inputDimensions\n wrapAround\n numActiveColumnsPerInhArea\n minPctOverlapDutyCycle\n logPathOutputDense\n globalInhibition\n spInputNonZeros\n columnDimensions\n logPathInput\n logPathOutput\n localAreaDensity\n synPermConnected\n synPermInactiveDec\n inputWidth\n spVerbosity\n denseOutput\n inferenceMode\n dutyCyclePeriod\n sparseCoincidenceMatrix\n anomalyMode\n synPermActiveInc\n seed\n boostStrength\n spOverlapDistribution\n spOutputNonZeros\n potentialPct\n self\n",) (<type 'exceptions.RuntimeError'>) Traceback (most recent call last): File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/swarming/utils.py", line 435, in runModelGivenBaseAndParams (completionReason, completionMsg) = runner.run() File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/swarming/ModelRunner.py", line 245, in run self._model = ModelFactory.create(modelDescription) File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/frameworks/opf/modelfactory.py", line 80, in create return modelClass(**modelConfig['modelParams']) File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", line 207, in __init__ clParams, anomalyParams) File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", line 1108, in __createCLANetwork n.addRegion("SP", "py.SPRegion", json.dumps(spParams)) File "/home/tatulec/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", line 665, in addRegion engine.Network.addRegion(self, name, nodeType, nodeParams) File "/usr/local/lib/python2.7/dist-packages/nupic/bindings/engine_internal.py", line 1109, in addRegion return _engine_internal.Network_addRegion(self, *args, **kwargs) RuntimeError: Unknown parameter 'maxBoost' for region 'SP' of type 'py.SPRegion' Valid parameters are:
I will be grateful for any help here, thanks!
There was a breaking change between NuPIC 0.4.0 and 0.5.0. In your code, change
I am not using “maxBoost” anywhere in my code (i.e. my swarm script or swarm_description.py), AFAIK. I get the same error when running the swarm.py script in the OneHotGym prediction tutorial included with nupic.
It looks like you might have two versions of NuPIC installed. When you updated, did you make sure to uninstall completely before updating? I know it is not obvious, but sometimes it causes problems. Do that, then reinstall NuPIC. Then try again?
Whoops, I was wrong here… I meant
I have done the uninstall. It still comes up with the same error after I reinstalled.
I also have a seemingly related question. After reinstalling, I updated nupic:
tatulec@UbuntuHP:~$ sudo pip install nupic --user --upgrade
…and also the same for nupic.bindings… it seems I am left with a different version of nupic bindings, depending on whether I run “install upgrade” on nupic or nupic.bindings. If I do nupic last I am left with these versions:
nupic 0.5.7 nupic.bindings 0.4.13
…if I ran the nupic.bindings one I get:
nupic 0.5.7 nupic.bindings 0.5.1
Which should it be? (incidentally, for the error concerned in this thread it doesn’t seem to matter)
I have no idea if
pip install nupic --upgrade works as you expect it to work. I imagine it does not. I recommend completely uninstalling nupic and reinstalling with
pip install nupic --user.
This is correct:
The current tip of master in the repo uses
0.5.7 it requires nupic.core
I certainly followed that recommendation: I uninstalled as described, no problems there.
After that I reinstalled from scratch, i.e. step by step.
I actually created a new user account, installed everything from scratch (some stuff like pip, python, etc did not need reinstalling as its system-wide, I guess). I still have the problem error described in the thread start. but this time I got some more info in the error, not sure if this is relevant…:
[/root/bamboo-agent-home/xml-data/build-dir/NUP-CORE-NCRM/src/nupic/engine/YAMLUtils.cpp line 285]
Traceback (most recent call last):
File "hotgym.py", line 96, in <module>
File "hotgym.py", line 67, in runHotgym
model = createModel()
File "hotgym.py", line 62, in createModel
File "/home/tomba/.local/lib/python2.7/site-packages/nupic/frameworks/opf/modelfactory.py", line 80, in create
File "/home/tomba/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", line 207, in __init__
File "/home/tomba/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", line 1108, in __createCLANetwork
n.addRegion("SP", "py.SPRegion", json.dumps(spParams))
File "/home/tomba/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", line 665, in addRegion
This seems like the place to debug. Add
print model_params.MODEL_PARAMS here to see what the model params actually look like when it is trying to create a model. The error seems to indicate that the params are malformed or missing.
Ehhh, seems I have a problem the other way now, i.e. boostStrength is unknown:
RuntimeError: Unknown parameter 'boostStrength' for region 'SP' of type 'py.SPRegion'
So how could that happen, did I somehow revert to an older version…?
What have you done since you reported the last error? I’m having trouble keeping up with you. What version of nupic/nupic.bindings do you have installed now?
tatulec@UbuntuHP:~$ python -c 'import pkg_resources;n=pkg_resources.get_distribution("nupic");b=pkg_resources.get_distribution("nupic.bindings");print n.project_name, n.version;print b.project_name, b.version' nupic 0.5.7 nupic.bindings 0.4.13
Summary: I followed uninstall instructions. I cloned the nupic directory from github.
After that, I reinstalled using:
sudo pip install nupic --user,
I set these two env variables:
…test that mysql still works:
(result is success)
To run a swarm I only use a
swarm_description.py as described in hotgym-example, with just one variable, nothing special here. I believe that swarm-script (based on the hotgym one) creates a directory which has amongst others these files:
The description.py that is created actually contains the problematic maxBoost field. I believe that is the problem.
So since yesterday, swarming now works, but my models are created with a maxBoost field. So in a way it works now, but other models (which I obtained by manual field editing, not swarming) and changed maxBoost to boostStrength now don’t work.
Looks like the problem at this point is that you have installed NuPIC at 0.5.7 from Pypi, but you have the codebase checked out that is tip of master. Follow these instructions to sync you code checkout with the installation version before running any example code or tests.
I am at a loss now.
Since last time, I reinstalled Ubuntu 16.04LTS, installed nupic, (this time using virtualenv). I followed the instructions with the git fetch/tag.
Got all the unit tests running, no fails (an imporvement over my original install), but… while swarming works, it also creates models with maxBoost field. This leads to the “
Unknown parameter 'boostStrength' for region 'SP' of type 'py.SPRegion'” error when attempting to use that model.
Should I maybe do more than just:
pip install nupic (–user option is not allowed under virtualenv, BTW)
This is driving me crazy (and Matt too, I guess).
This is probably not a big deal. You probably have both versions of NuPIC installed somehow. This can happen if you have more than one python installed. Sometimes when you run
>python script.py from the command line it is a different python than if you run
>./script.py, it depends on your OS.
I suggest you just replace
boostStrength in the models swarming creates and continue with your work.