Skip to content

Commit

Permalink
fix for extra blank line in run log: was copying sizes.. also run arg…
Browse files Browse the repository at this point in the history
… fix.
  • Loading branch information
rcoreilly committed Jan 8, 2025
1 parent 1a8602a commit 4d2aabf
Show file tree
Hide file tree
Showing 17 changed files with 58 additions and 46 deletions.
2 changes: 1 addition & 1 deletion axon/simstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ func StatLevelAll(statsDir *tensorfs.Node, srcMode, srcLevel enums.Enum, styleFu
for _, cl := range cols {
clv := cl.Tensor.(tensor.Values)
if start {
trg := tensorfs.ValueType(allDir, cl.Name(), clv.DataType(), clv.Shape().Sizes...)
trg := tensorfs.ValueType(allDir, cl.Name(), clv.DataType(), clv.ShapeSizes()...)
if trg.Len() == 0 {
if styleFunc != nil {
plot.SetFirstStylerTo(trg, func(s *plot.Style) {
Expand Down
12 changes: 12 additions & 0 deletions sims/bgdorsal/bg-dorsal.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"fmt"
"reflect"

"cogentcore.org/core/base/metadata"
"cogentcore.org/core/base/num"
"cogentcore.org/core/base/reflectx"
"cogentcore.org/core/cli"
Expand Down Expand Up @@ -893,6 +894,17 @@ func (ss *Sim) ConfigStats() {
tsr.AppendRowFloat(stat)
}
})
runAllFunc := axon.StatLevelAll(ss.Stats, Train, Run, func(s *plot.Style, cl tensor.Values) {
name := metadata.Name(cl)
switch name {
case "FirstZero", "LastZero":
s.On = true
s.Range.SetMin(0)
}
})
ss.AddStat(func(mode Modes, level Levels, phase StatsPhase) {
runAllFunc(mode, level, phase == Start)
})
}

// StatCounters returns counters string to show at bottom of netview.
Expand Down
6 changes: 3 additions & 3 deletions sims/bgdorsal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"25" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/bgventral/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"1" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/choose/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/deepfsa/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/deepmove/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ type RunConfig struct { //types:add
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/deepmusic/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ type RunConfig struct { //types:add
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/hip/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ type RunConfig struct {
StopMem float32 `default:"0.9"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/mpi/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/objrec/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/pfcmaint/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"1" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/pvlv/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"25" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/ra25/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/ra25x/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"5" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/rl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"1" min:"1"`
Expand Down
6 changes: 3 additions & 3 deletions sims/vspatch/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ type RunConfig struct {
NThreads int `default:"0"`

// Run is the _starting_ run number, which determines the random seed.
// NRuns counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, NRuns = 1.
Run int `default:"0"`
// Runs counts up from there. Can do all runs in parallel by launching
// separate jobs with each starting Run, Runs = 1.
Run int `default:"0" flag:"run"`

// Runs is the total number of runs to do when running Train, starting from Run.
Runs int `default:"1" min:"1"`
Expand Down

0 comments on commit 4d2aabf

Please sign in to comment.