Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Error running hierarchy_network_demo.py #3257

Closed
Containerhouse opened this issue Aug 10, 2016 · 5 comments · Fixed by #3652
Closed

Error running hierarchy_network_demo.py #3257

Containerhouse opened this issue Aug 10, 2016 · 5 comments · Fixed by #3652

Comments

@Containerhouse
Copy link
Member

Containerhouse commented Aug 10, 2016

Running the stock file hierarchy_network_demo.py (nupic/examples/network) the following error is thrown before it is able to write the .csv:

Writing output to: hierarchy-demo-output.csv
Traceback (most recent call last):
  File "hierarchy_network_demo.py", line 368, in <module>
    runDemo()
  File "hierarchy_network_demo.py", line 362, in runDemo
    runNetwork(network, numRecords, writer)
  File "hierarchy_network_demo.py", line 305, in runNetwork
    network.run(1)
  File "/usr/local/lib/python2.7/dist-packages/nupic-0.5.5.dev0-py2.7.egg/nupic/engine/__init__.py", line 693, in run
    engine.Network.run(self, n)
  File "/usr/local/lib/python2.7/dist-packages/nupic.bindings-0.4.5.dev0-py2.7-linux-x86_64.egg/nupic/bindings/engine_internal.py", line 1147, in run
    return _engine_internal.Network_run(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nupic.bindings-0.4.5.dev0-py2.7-linux-x86_64.egg/nupic/bindings/regions/PyRegion.py", line 178, in guardedCompute
    return self.compute(inputs, DictReadOnlyWrapper(outputs))
  File "/usr/local/lib/python2.7/dist-packages/nupic-0.5.5.dev0-py2.7.egg/nupic/regions/SDRClassifierRegion.py", line 352, in compute
    categories = [category for category in inputs["categoryIn"]
KeyError: 'categoryIn'
@rhyolight
Copy link
Member

I can replicate this error. @scottpurdy can @andrewmalta13 look into this?

@scottpurdy
Copy link
Contributor

@mrcslws can you take a look

@rhyolight
Copy link
Member

@mrcslws Just told me that there is some history around this issue, but now I'm more confused. We probably just need to fix this demo so an error is not thrown, perhaps we don't need to crawl down that categoryIn rabbit hole.

@rhyolight
Copy link
Member

I tried running the example by switching the params spatialImp & temporalImp to py instead of cpp, and it ran for a long while before having the same error.

However with cpp it crashed right away. Using py it was able to run a lot of records through before crashing. 🤷‍♂️

@scottpurdy scottpurdy self-assigned this May 26, 2017
@scottpurdy
Copy link
Contributor

There appear to be a couple issues. One is recent changes to do away with customCompute in the classifier region. I've made those changes and will push a new version of the hierarchy demo soon to close out this issue. The predictions will still be incorrect though until we address #3651

scottpurdy added a commit to scottpurdy/nupic that referenced this issue May 26, 2017
The demo had not been updated to work with the changes to the classifier region to do away with
so the demo was updated with the necessary network links and specification to the sensor region which field to output.
The demo works now but does not get proper predictions due to numenta#3257
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants