Skip to content

Commit ea71657

Browse files
author
Randall C. O'Reilly
committed
readme, python fixes ahead of 1.0.0 release
1 parent e47d098 commit ea71657

File tree

6 files changed

+185
-12
lines changed

6 files changed

+185
-12
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ This is the Go implementation of the Leabra algorithm for biologically-based mod
88

99
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).
1010

11-
# Current Status / News
12-
13-
* 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!
11+
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).
1412

15-
* 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.
13+
# Current Status / News
1614

17-
* 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.
15+
* 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.
1816

1917
* 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.
2018

examples/ra25/ra25.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,9 @@ def Counters(self, train):
428428
and add a few tabs at the end to allow for expansion..
429429
"""
430430
if train:
431-
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)
431+
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)
432432
else:
433-
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)
433+
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)
434434

435435
def UpdateView(self, train):
436436
if self.NetView != 0 and self.NetView.IsVisible():
@@ -849,7 +849,7 @@ def LogTrnEpc(self, dt):
849849
if self.TrnEpcFile != 0:
850850
if self.TrainEnv.Run.Cur == 0 and epc == 0:
851851
dt.WriteCSVHeaders(self.TrnEpcFile, etable.Tab)
852-
dt.WriteCSVRow(self.TrnEpcFile, row, etable.Tab, True)
852+
dt.WriteCSVRow(self.TrnEpcFile, row, etable.Tab)
853853

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

918918
dt.SetCellFloat("Epoch", trl, epc)
919919
dt.SetCellFloat("Trial", trl, trl)
920-
dt.SetCellString("TrialName", trl, self.TestEnv.TrialName)
920+
dt.SetCellString("TrialName", trl, self.TestEnv.TrialName.Cur)
921921
dt.SetCellFloat("SSE", trl, self.TrlSSE)
922922
dt.SetCellFloat("AvgSSE", trl, self.TrlAvgSSE)
923923
dt.SetCellFloat("CosDiff", trl, self.TrlCosDiff)
@@ -1158,7 +1158,7 @@ def LogRun(self, dt):
11581158
if self.RunFile != 0:
11591159
if row == 0:
11601160
dt.WriteCSVHeaders(self.RunFile, etable.Tab)
1161-
dt.WriteCSVRow(self.RunFile, row, etable.Tab, True)
1161+
dt.WriteCSVRow(self.RunFile, row, etable.Tab)
11621162

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

1205-
win = gi.NewWindow2D("ra25", "Leabra Random Associator", width, height, True)
1205+
win = gi.NewMainWindow("ra25", "Leabra Random Associator", width, height)
12061206
self.Win = win
12071207

12081208
vp = win.WinViewport2D()

go.mod

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module github.com/emer/leabra
2+
3+
go 1.13
4+
5+
require (
6+
github.com/Masterminds/vcs v1.13.1
7+
github.com/alecthomas/chroma v0.7.0
8+
github.com/apache/arrow/go/arrow v0.0.0-20191228022829-81f0d4228e59
9+
github.com/aymerick/douceur v0.2.0
10+
github.com/chewxy/math32 v1.0.4
11+
github.com/emer/emergent v1.0.0
12+
github.com/emer/etable v1.0.0
13+
github.com/go-gl/mathgl v0.0.0-20190713194549-592312d8590a
14+
github.com/go-python/gopy v0.3.1
15+
github.com/goki/gi v0.9.10
16+
github.com/goki/ki v0.9.10
17+
github.com/goki/pi v0.5.10
18+
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
19+
github.com/pmezard/go-difflib v1.0.0
20+
github.com/srwiley/rasterx v0.0.0-20181219215540-696f7edb7a7e
21+
github.com/srwiley/scanx v0.0.0-20190309010443-e94503791388
22+
golang.org/x/image v0.0.0-20191214001246-9130b4cfad52
23+
gonum.org/v1/gonum v0.6.2
24+
gonum.org/v1/plot v0.0.0-20191107103940-ca91d9d40d0a
25+
)

0 commit comments

Comments
 (0)