htm-community / nupic-history-server

Runs NuPIC behind a web server, exposing internals. For HTM School.
GNU Affero General Public License v3.0
11 stars 7 forks source link

Support htm.core repo for visualization #16

Open breznak opened 4 years ago

breznak commented 4 years ago

Hi Matt,

I wonder what would it take to support htm.core with your famous visualizations? Currently we got HTMpandaViz tool from @Zbysekz , currenty we sometimes do plots by storing a snapshot of Connections (a common synaptic data-structure for both SP, TM, CP...).

It would be nice if we could form some semi-stable common format

rhyolight commented 4 years ago

You can see the data I exposed through these keys:

class SpSnapshots(Snapshots):
  INPUT = "input"
  POT_POOLS = "potentialPools"
  CON_SYN = "connectedSynapses"
  PERMS = "permanences"
  ACT_COL = "activeColumns"
  OVERLAPS = "overlaps"
  ACT_DC = "activeDutyCycles"
  OVP_DC = "overlapDutyCycles"
  INH_MASKS = "inhibitionMasks"
  BST_FCTRS = "boostFactors"

class TmSnapshots(Snapshots):
  ACT_CELLS = "activeCells"
  PRD_CELLS = "predictiveCells"
  ACT_SEGS = "activeSegments"
  MCH_SEGS = "matchingSegments"

Each key exposes a simple data structure.

rhyolight commented 4 years ago

To support another HTM implementation, one would need to create new facade classes for them like sp_facade.py and tm_facade.py.

breznak commented 4 years ago

Thanks Matt! @Zbysekz what do you think of this format, can it be somehow used by your tool?

Zbysekz commented 4 years ago

I am on the border with decision to throw away the interface that i made for pandaVis and use this or at least similar attitude... run simulation and fill data into database, then vis can replay it and do whatever with it. I got into problems as we @breznak discussed in https://github.com/htm-community/NAB/pull/36 Besides other very nice things it would be faster.

breznak commented 4 years ago

run simulation and fill data into database, then vis can replay it and do whatever with it.

Only you'd be missing the "interactively click/activate a cell and see what happens" feature. I don't know how cool,needed that is?

Otherwise, the replay from a database would be by far the easiest way, imho

Zbysekz commented 4 years ago

@breznak you misunderstand that feature or i explained that not clearly... If you click on cell, you just get focused on to that cell and the server is requested to send connections data. You do not activate that cell manually.. vis is just observer. This data per request are just because of lowering data traffic.

But with the database... that could be another level.

breznak commented 4 years ago

You do not activate that cell manually.. vis is just observer.

oh, I see. so the 'click' is just narrowing-down the visualization. I guess I recalled from Matt's videos where you clicked to activate cells. So if such functionality has never been supported, I see no problem.