Problems using a Nupic example (Hotgym)

Is that the entire output of the make command?

No, the rest is gone, I just retrieved what my console had. I guess I couldā€™ve ran some command to write the output to a file, but I forgotā€¦

Honestly, I donā€™t know how to help you. Iā€™ve never seen that compile error before, and I donā€™t know what bed.h is.

I think bed.h is just something from the previous line of codeā€¦there were thousands of lines of code being outputted so my console couldnā€™t keep all of itā€¦

Iā€™ll try to install a VM with Ubuntu 14.04, and try NuPIC that way.

I think the bed.h thing is a red herring. I have an idea, try to manually install the yaml packages as described here:

http://stackoverflow.com/questions/14261614/how-do-i-install-the-yaml-package-for-python

You might need to change the method for kubuntu.

@Addonis ā€™ system is proof positive of the existence of gremlins! :stuck_out_tongue: I think I went through this with him and the OpenJDK issue? Was that you @Addonis?

I installed them using the pip command, and the apt-get command. It was successful.

I still get the error when I run the ā€œmake -j4ā€ though.
Here are some of the output from running that command:

Well, Kubuntu 15.04 & 15.10 is pretty unstable, although it was worse when it launched. Iā€™m thinking of upgrading to 16.04.


Yea, I am having issues with Java too. But my Windows machine has even more problems. So at least thatā€™s goodā€¦

1 Like

Works flawlesly with Ubuntu14.04.4(64-bit) in a virtual machine. Iā€™m running the swarming.py right now, and itā€™s working fine (just takes a while to run it in a VM).

1 Like

Do you know why the ā€œā€“plotā€ is not working?

acheron@ubuntu:~/nupic/examples/opf/clients/hotgym/prediction/one_gym$ python run.py --"plot"
Starts a NuPIC model from the model params returned by the swarm
and pushes each line of input from the gym into the model. Results
are written to an output file (default) or plotted dynamically if
the --plot option is specified.
NOTE: You must run ./swarm.py before this, because model parameters
are required to run NuPIC.

Creating model from rec-center-hourly...
Importing model params from model_params.rec_center_hourly_model_params
Traceback (most recent call last):
  File "run.py", line 149, in <module>
    runModel(GYM_NAME, plot=plot)
  File "run.py", line 139, in runModel
    runIoThroughNupic(inputData, model, gymName, plot)
  File "run.py", line 99, in runIoThroughNupic
    output = nupic_output.NuPICPlotOutput([gymName])
  File "/home/acheron/nupic/examples/opf/clients/hotgym/prediction/one_gym/nupic_output.py", line 116, in __init__
    plt.ion()
NameError: global name 'plt' is not defined

This is a matplotlib issue, see: http://lists.numenta.org/pipermail/nupic_lists.numenta.org/2014-July/008991.html

Youā€™re right, sudo apt-get install python-matplotlib fixes this error.

1 Like

Do you mean that we donā€™t have to set up the mysql ourselves if we install nupic correctly?THANK!

Also,do we have to install mysql first?

MySQL is required for swarming only. If you are not running a swarm, you donā€™t need it installed or running. Because swarming tests run in our test suite, that means youā€™ll need MySQL if you want all tests to pass as well.

2 Likes

This issue (global name plt is not defined) got resolved by upgrading numpy to latest version: sudo pip install -U numpy

1 Like

Sorry, Iā€™m sure this is user error.

Iā€™m on windows 7, Ran the swarm successfully, but when trying to run the run.py I get an error that it canā€™t find the swarm models.

Hereā€™s an image. you can see that the models were created correctly but it still gives me the ā€œNo model params exist for ā€˜rec-center-hourlyā€™. Run swarm first!ā€

any suggestions? I havenā€™t modified the tutorial code.

According to the screenshot, there is not a __init__.py in ā€œmodel_params/ā€, rendering model_params.rec_center_hourly_model_params not a ā€œpackageā€ from which MODEL_PARAMS may be imported. You could try to create an empty file called __init__.py in the "odel_params/ directory. Another possible solution might be to fixup getModelParamsFromName() to either sys.path.append("model_params") or temporarily os.chdir("model_params") and remove ā€œmodel_params.ā€ from importName, bypassing the issue of model_params not being a package.

As for why there is no __init__.py, at least according to https://github.com/numenta/nupic/blob/master/examples/opf/clients/hotgym/prediction/one_gym/swarm.py#L52-L62 there is no code to generate that __init__.py, so I donā€™t know why it ever worked (Iā€™m looking in your general direction @rhyolight). You could add the following line, which will force the creation of that file, allowing its use as a package:

open("__init__.py", "w").close()
1 Like

thanks! works perfectly, sorry Iā€™m a python noob.

I think this will help: Auto-add __init__.py when model parms created by rhyolight Ā· Pull Request #3501 Ā· numenta/nupic-legacy Ā· GitHub