Reusing a Permute variable the same swarm

I’d like to run a swarm, one of the variables I want to optimise is the columnCount field, now this needs to be the same for the spatial pooler and the temporal pooler. Is there any way I can change my so that the number of columns is the same in SP and TM for each model? I have this currently:

    'spParams': {
        'potentialPct': PermuteFloat(0.25, 0.85),
        'synPermActiveInc': PermuteFloat(0.03, 0.07),
        'synPermInactiveDec': PermuteFloat(0.0003, 0.1),
        'columnCount': PermuteChoices([128,256,512,2048, 4096])

    'tmParams': {
        'activationThreshold': PermuteInt(12, 16),
        'columnCount': PermuteChoices([128,256,512,2048, 4096]),
        'minThreshold': PermuteInt(9, 12),
        'pamLength': PermuteInt(1, 5),
        'cellsPerColumn': PermuteChoices([16, 32, 64, 96])

So basically, how do I make the permuted value for tmParams.columnCount = spParams.columnCount? Not doing so gives me this error:

File "/home/mack0242/.pyenv/versions/2.7.12/lib/python2.7/site-packages/nupic/frameworks/opf/", line 1159, in __createHTMNetwork
    assert tmParams['columnCount'] == prevRegionWidth

Hey @scott you might know the answer to this.

I’m not sure off the top of my head but it should be easy to check. You can create the permute variable outside the dict and reference it in both places. If that doesn’t work then the swarm will fail. In that case, I don’t think it is supposed by the current swarming library.

Setting the variable outside the dict worked, although I got a strange result, the swarm didn’t give the predicted field an encoder in the best model. Is this normal? I can provide my, and the data file I used if you like.

Yeah that is possible but probably a sign that the data isn’t very predictable in general. Are the results any good?