Skip to content

Commit

Permalink
readme, python fixes ahead of 1.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall C. O'Reilly committed Dec 30, 2019
1 parent e47d098 commit ea71657
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 12 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ This is the Go implementation of the Leabra algorithm for biologically-based mod

See [Wiki Install](https://github.com/emer/emergent/wiki/Install) for installation instructions, and the [Wiki Rationale](https://github.com/emer/emergent/wiki/Rationale) and [History](https://github.com/emer/emergent/wiki/History) pages for a more detailed rationale for the new version of emergent, and a history of emergent (and its predecessors).

# Current Status / News

* 11/2019: **nearing 1.0 complete release** -- [CCN textbook simulations](https://github.com/CompCogNeuro/sims) are (nearly) done and `hip`, `deep` and `pbwm` variants are in place and robustly tested. Nearing full feature parity with C++ emergent!
See the [ra25 example](https://github.com/emer/leabra/blob/master/examples/ra25/README.md) for a complete working example (intended to be a good starting point for creating your own models), and any of the 26 models in the [Comp Cog Neuro sims](https://github.com/CompCogNeuro/sims) repository which also provide good starting points. See the [etable wiki](https://github.com/emer/etable/wiki) for docs and example code for the widely-used etable data table structure, and the `family_trees` example in the CCN textbook sims which has good examples of many standard network representation analysis techniques (PCA, cluster plots, RSA).

* 6/12/2019: **Initial beta release** -- see the [ra25 example](https://github.com/emer/leabra/blob/master/examples/ra25) for a fully functional demo. This example code is now sufficiently feature complete to provide a reasonable starting point for creating your own simulations, with both the Go and Python versions closely matched in functionality so you can choose either way (or explore both!). We expect that although there will certainly be changes and improvements etc (there are many planned additions already), the existing code should be reasonably stable at this point, with only relatively minor changes to the API -- it is now safe to start building your own models! Please file issues on github (use the emergent repository's issue tracker) for any bugs or other issues you find.
# Current Status / News

* 4/2019: separated this `leabra` repository from the overall `emergent` repository, to make it easier to fork and save / modify just the algorithm components of the system independent of the overall emergent infrastructure. You just need to replace "github.com/emer/emergent/leabra/leabra" -> "github.com/emer/leabra/leabra" in your imports.
* 12/30/2019: Version 1.0.0 Released! -- [CCN textbook simulations](https://github.com/CompCogNeuro/sims) are done and `hip`, `deep` and `pbwm` variants are in place and robustly tested.

* 3/2019: Python interface is up and running! See the `python` directory in `leabra` for the [README](https://github.com/emer/leabra/blob/master/python/README.md) status and how to give it a try. You can run the full `examples/leabra25ra` code using Python, including the GUI etc.

Expand Down
12 changes: 6 additions & 6 deletions examples/ra25/ra25.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ def Counters(self, train):
and add a few tabs at the end to allow for expansion..
"""
if train:
return "Run:\t%d\tEpoch:\t%d\tTrial:\t%d\tCycle:\t%d\tName:\t%s\t\t\t" % (self.TrainEnv.Run.Cur, self.TrainEnv.Epoch.Cur, self.TrainEnv.Trial.Cur, self.Time.Cycle, self.TrainEnv.TrialName)
return "Run:\t%d\tEpoch:\t%d\tTrial:\t%d\tCycle:\t%d\tName:\t%s\t\t\t" % (self.TrainEnv.Run.Cur, self.TrainEnv.Epoch.Cur, self.TrainEnv.Trial.Cur, self.Time.Cycle, self.TrainEnv.TrialName.Cur)
else:
return "Run:\t%d\tEpoch:\t%d\tTrial:\t%d\t\tCycle:\t%dName:\t%s\t\t\t" % (self.TrainEnv.Run.Cur, self.TrainEnv.Epoch.Cur, self.TestEnv.Trial.Cur, self.Time.Cycle, self.TestEnv.TrialName)
return "Run:\t%d\tEpoch:\t%d\tTrial:\t%d\t\tCycle:\t%dName:\t%s\t\t\t" % (self.TrainEnv.Run.Cur, self.TrainEnv.Epoch.Cur, self.TestEnv.Trial.Cur, self.Time.Cycle, self.TestEnv.TrialName.Cur)

def UpdateView(self, train):
if self.NetView != 0 and self.NetView.IsVisible():
Expand Down Expand Up @@ -849,7 +849,7 @@ def LogTrnEpc(self, dt):
if self.TrnEpcFile != 0:
if self.TrainEnv.Run.Cur == 0 and epc == 0:
dt.WriteCSVHeaders(self.TrnEpcFile, etable.Tab)
dt.WriteCSVRow(self.TrnEpcFile, row, etable.Tab, True)
dt.WriteCSVRow(self.TrnEpcFile, row, etable.Tab)

# note: this is how you log to a pandas.DataFrame
# nwdat = [epc, self.EpcSSE, self.EpcAvgSSE, self.EpcPctErr, self.EpcPctCor, self.EpcCosDiff, 0, 0, 0]
Expand Down Expand Up @@ -917,7 +917,7 @@ def LogTstTrl(self, dt):

dt.SetCellFloat("Epoch", trl, epc)
dt.SetCellFloat("Trial", trl, trl)
dt.SetCellString("TrialName", trl, self.TestEnv.TrialName)
dt.SetCellString("TrialName", trl, self.TestEnv.TrialName.Cur)
dt.SetCellFloat("SSE", trl, self.TrlSSE)
dt.SetCellFloat("AvgSSE", trl, self.TrlAvgSSE)
dt.SetCellFloat("CosDiff", trl, self.TrlCosDiff)
Expand Down Expand Up @@ -1158,7 +1158,7 @@ def LogRun(self, dt):
if self.RunFile != 0:
if row == 0:
dt.WriteCSVHeaders(self.RunFile, etable.Tab)
dt.WriteCSVRow(self.RunFile, row, etable.Tab, True)
dt.WriteCSVRow(self.RunFile, row, etable.Tab)

def ConfigRunLog(self, dt):
dt.SetMetaData("name", "RunLog")
Expand Down Expand Up @@ -1202,7 +1202,7 @@ def ConfigGui(self):
gi.SetAppName("ra25")
gi.SetAppAbout('This demonstrates a basic Leabra model. See <a href="https://github.com/emer/emergent">emergent on GitHub</a>.</p>')

win = gi.NewWindow2D("ra25", "Leabra Random Associator", width, height, True)
win = gi.NewMainWindow("ra25", "Leabra Random Associator", width, height)
self.Win = win

vp = win.WinViewport2D()
Expand Down
25 changes: 25 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module github.com/emer/leabra

go 1.13

require (
github.com/Masterminds/vcs v1.13.1
github.com/alecthomas/chroma v0.7.0
github.com/apache/arrow/go/arrow v0.0.0-20191228022829-81f0d4228e59
github.com/aymerick/douceur v0.2.0
github.com/chewxy/math32 v1.0.4
github.com/emer/emergent v1.0.0
github.com/emer/etable v1.0.0
github.com/go-gl/mathgl v0.0.0-20190713194549-592312d8590a
github.com/go-python/gopy v0.3.1
github.com/goki/gi v0.9.10
github.com/goki/ki v0.9.10
github.com/goki/pi v0.5.10
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/pmezard/go-difflib v1.0.0
github.com/srwiley/rasterx v0.0.0-20181219215540-696f7edb7a7e
github.com/srwiley/scanx v0.0.0-20190309010443-e94503791388
golang.org/x/image v0.0.0-20191214001246-9130b4cfad52
gonum.org/v1/gonum v0.6.2
gonum.org/v1/plot v0.0.0-20191107103940-ca91d9d40d0a
)
Loading

0 comments on commit ea71657

Please sign in to comment.