Problems using a Nupic example (Hotgym)


#21

Is that the entire output of the make command?


#22

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…


#23

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.


#24

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.


#25

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.


#26

@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?


#27

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:


#28

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…


#29

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).


#30

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

Hot Gym Anomaly Plot Error
#31

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


#32

You’re right, sudo apt-get install python-matplotlib fixes this error.


#33

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


#34

Also,do we have to install mysql first?


#35

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.


#36

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


#37

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.


#38

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()

#39

thanks! works perfectly, sorry I’m a python noob.


#40

I think this will help: https://github.com/numenta/nupic/pull/3501