Hi Diego,
I'm sorry, but I'm not sure what's wrong. I would try cleaning out all the relevant directories (including /tmp/cerebro2) and following the instructions in the READMEs, starting from cerebro2.server README. Sorry I can't be of more help, Chetan On Wed, Sep 24, 2014 at 8:33 AM, Matthew Taylor <[email protected]> wrote: > Discussion about installing Cerebro2 below. I'm forwarding to the list > in case it could help others. Diego and Chetan will continue the > discussion on the list from this point. > --------- > Matt Taylor > OS Community Flag-Bearer > Numenta > ---------- Forwarded message ---------- > From: Diego Martinez <[email protected]> > Date: Wed, Sep 24, 2014 at 2:55 AM > Subject: Re: Installing Cerebro2 (debugging tool) > To: Chetan Surpur <[email protected]> > Cc: Matthew Taylor <[email protected]> > Hello Chetan, > Yes i ran the three files together but i have also ran them > individually with the very same results. I just did it again with > demo_tp.py just to be sure and i received the very same error i sent > you above. > @Matthew: no problem from my side. > D. > 2014-09-23 19:35 GMT+02:00 Chetan Surpur <[email protected]>: >> >> Hi Diego, >> >> From your previous email, it looks like you ran the following command: >> >> python demo_coordinate_encoder.py && python demo_sp.py && python demo_tp.py >> >> I suggest running just python demo_tp.py and trying again. Let me know if >> you tried that and it didn't work. >> >> - Chetan >> >> >> >> On Tue, Sep 23, 2014 at 3:05 AM, Diego Martinez <[email protected]> wrote: >>> >>> Hello Chetan, >>> >>> As i stated in my previous e-mail when running only demo_sp.py i get the >>> same error.... >>> >>> D. >>> >>> 2014-09-22 19:22 GMT+02:00 Chetan Surpur <[email protected]>: >>>> >>>> Try running just demo_sp.py or demo_tp.py and then opening Cerebro 2 in >>>> your browser. >>>> >>>> >>>> >>>> On Mon, Sep 22, 2014 at 4:56 AM, Diego Martinez <[email protected]> wrote: >>>>> >>>>> Hello Chetan, >>>>> >>>>> Thanks for your quick answer. For the moment i only want to run one of >>>>> the demos. Once is clear for me how it works i will apply it to my models. >>>>> >>>>> I ran this on the terminal ~/nupic.cerebro2.server$ python >>>>> demo_coordinate_encoder.py && python demo_sp.py && python demo_tp.py. I >>>>> can see some information loading + iterations till 100 like this: >>>>> >>>>> **btw: not sure i need to run all the three files at the same time, i >>>>> also ran them individually but i had the same results** >>>>> >>>>> ===== [-149 24] / 3 ===== >>>>> [ 0 57 58 131 200 208 245 284 373 379 424 448 449 515 528 558 592 664 >>>>> 763 853 908 963 978 987 998] >>>>> . >>>>> . >>>>> >>>>> Ran iteration: 0 >>>>> Ran iteration: 1 >>>>> Ran iteration: 2 >>>>> . >>>>> . >>>>> >>>>> Then i run python server.py 9090 and the server is started successfully. >>>>> I open a new terminal and go to cerebro2-client, cd into static folder >>>>> and run command: python -m SimpleHTTPServer 8000 and everything worked >>>>> fine. However, when i go to http://localhost:8000 the page is completely >>>>> in blank and i can see an error in the server terminal where i started >>>>> port 9090. Here below i am sending you the error for your reference. >>>>> >>>>> 127.0.0.1:52077 - - [22/Sep/2014 13:37:57] "HTTP/1.1 GET >>>>> /_model/num_iterations" - 200 OK >>>>> Traceback (most recent call last): >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 239, in process >>>>> return self.handle() >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 230, in handle >>>>> return self._delegate(fn, self.fvars, args) >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 420, in _delegate >>>>> return handle_class(cls) >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 396, in handle_class >>>>> return tocall(*args) >>>>> File "/home/diego/nupic.cerebro2.server/api/model_api.py", line 46, in >>>>> GET >>>>> return jsonResponse(readJSON(filepath)) >>>>> File "/home/diego/nupic.cerebro2.server/api/model_api.py", line 68, in >>>>> readJSON >>>>> raise error >>>>> IOError: [Errno 2] No such file or directory: >>>>> u'/tmp/cerebro2/model/dimensions/input.json' >>>>> >>>>> 127.0.0.1:52078 - - [22/Sep/2014 13:37:57] "HTTP/1.1 GET >>>>> /_model/dimensions/output" - 200 OK >>>>> Traceback (most recent call last): >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 239, in process >>>>> return self.handle() >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 230, in handle >>>>> return self._delegate(fn, self.fvars, args) >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 420, in _delegate >>>>> return handle_class(cls) >>>>> File "/usr/local/lib/python2.7/dist-packages/web/application.py", line >>>>> 396, in handle_class >>>>> return tocall(*args) >>>>> File "/home/diego/nupic.cerebro2.server/api/model_api.py", line 46, in >>>>> GET >>>>> return jsonResponse(readJSON(filepath)) >>>>> File "/home/diego/nupic.cerebro2.server/api/model_api.py", line 68, in >>>>> readJSON >>>>> raise error >>>>> IOError: [Errno 2] No such file or directory: >>>>> u'/tmp/cerebro2/model/encoders.json' >>>>> >>>>> 127.0.0.1:52077 - - [22/Sep/2014 13:37:58] "HTTP/1.1 GET >>>>> /_model/dimensions/input" - 500 Internal Server Error >>>>> 127.0.0.1:52078 - - [22/Sep/2014 13:37:58] "HTTP/1.1 GET >>>>> /_model/encoders" - 500 Internal Server Error >>>>> >>>>> Thanks for your support. >>>>> >>>>> Kindly regards, >>>>> Diego >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> 2014-09-22 1:31 GMT+02:00 Chetan Surpur <[email protected]>: >>>>>> >>>>>> Diego, >>>>>> >>>>>> You would use the patchCLAModel function to patch a CLAModel instance. >>>>>> In your case, you would do this at the place in code where >>>>>> run_opf_experiment.py creates a CLAModel instance. >>>>>> >>>>>> The demo_sp, demo_tp, etc. files all create their own CLAModel's and >>>>>> patch them. If you want to use OPF experiment instead, you can ignore >>>>>> those demo files. >>>>>> >>>>>> - Chetan >>>>>> >>>>>> >>>>>> >>>>>> On Sun, Sep 21, 2014 at 1:25 PM, Diego Martinez <[email protected]> wrote: >>>>>>> >>>>>>> Hello Matt Hello Chetan, >>>>>>> >>>>>>> I am following the Mailing List Etiquette format. I hope there is no >>>>>>> issues this time. >>>>>>> >>>>>>> Suppose i want to run one of the demos that come in cerebro2.server. So >>>>>>> i need to define: model,sp and tp to feed the patchCLAModel funtion. My >>>>>>> question is: what file should i use as model? The way i am >>>>>>> instantiating the model is by running run_opf_experiment.py using the >>>>>>> best parameters found after the swarm stored at >>>>>>> $NUPIC/examples/swarm/simple/model_0/, finally some csv and json files >>>>>>> are created. So, should i patch the patchCLAModel function inside the >>>>>>> run_opf_experiment.py file or inside a different file under model_0 or >>>>>>> somewhere else? Same question goes to what file to use as sp and tp. I >>>>>>> have created one new file called patcher_function.py that looks like >>>>>>> this (pretty much is what's written in the usage section): >>>>>>> >>>>>>> from cerebro2.patcher import Patcher >>>>>>> import demo_sp //this is the demo_sp.py file >>>>>>> import demo_tp /this is the demo_tp.py file >>>>>>> import demo_coordinate_encoder /this is the coordinate encoder demo >>>>>>> >>>>>>> Patcher().patchCLAModel(demo_coordinate_encoder) // i was just >>>>>>> testing/supposing this could be used as model >>>>>>> Patcher().patchCLAModel(demo_sp.run) // i was just testing/supposing >>>>>>> this could be used as sp >>>>>>> Patcher().patchCLAModel(demo_tp.run) // i was just testing/supposing >>>>>>> this could be used as tp >>>>>>> >>>>>>> Then i execute the file from the terminal: python patcher_function.py >>>>>>> and i get an error that the model does not contain the attribute >>>>>>> model._getSPRegion and in fact i couldn't find a different file that >>>>>>> contained this class. When setting sp = demo_sp.py i was able to find >>>>>>> sp = SpatialPooler(inputDimensions, columnDimensions etc) inside >>>>>>> demo_sp.py. >>>>>>> >>>>>>> Thanks- >>>>>>> D. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >>
