numenta/nupic-legacy

Network Initialization with Custom Region

kaikun213 opened this issue · 1 comments

Hello all,

following the example from IdentityRegion to construct a custom SensorRegion I stumbled on the problem that the internal_network engine is not initializing. Some region initialization must be missing.
When running "custom_region_demo.py" it gives you:

Traceback (most recent call last):
  File "custom_region_demo.py", line 127, in <module>
    network = createNetwork(dataSource)
  File "custom_region_demo.py", line 101, in createNetwork
    network.initialize()
  File "/home/kaikun/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", line 691, in initialize
    engine_internal.Network.initialize(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nupic/bindings/engine_internal.py", line 1159, in initialize
    return _engine_internal.Network_initialize(self)
TypeError: initialize() takes exactly 3 arguments (1 given)

I noticed the region is not intializing PyRegion as e.g. SP_Region etc. are in its init function.
PyRegion.__init__(self, **kwargs)

I did not look into the internal_engine, maybe someone knows what is missing?

I see the same problem when I run this from master. This is a valid issue.