Browse Source

模型评测默认8小时停止

tags/v1.22.5.1^2
ychao_1983 3 years ago
parent
commit
7a23d33d0e
2 changed files with 8 additions and 4 deletions
  1. +6
    -4
      modules/setting/setting.go
  2. +2
    -0
      routers/repo/cloudbrain.go

+ 6
- 4
modules/setting/setting.go View File

@@ -478,10 +478,11 @@ var (
BenchmarkMaxDuration int64

//snn4imagenet config
IsSnn4imagenetEnabled bool
Snn4imagenetOwner string
Snn4imagenetName string
Snn4imagenetServerHost string
IsSnn4imagenetEnabled bool
Snn4imagenetOwner string
Snn4imagenetName string
Snn4imagenetServerHost string
ModelBenchmarkMaxDuration int64

//snn4imagenet config
IsBrainScoreEnabled bool
@@ -1309,6 +1310,7 @@ func NewContext() {
Snn4imagenetOwner = sec.Key("OWNER").MustString("")
Snn4imagenetName = sec.Key("NAME").MustString("")
Snn4imagenetServerHost = sec.Key("HOST").MustString("")
ModelBenchmarkMaxDuration = sec.Key("MAX_DURATION").MustInt64(28800)

sec = Cfg.Section("brainscore")
IsBrainScoreEnabled = sec.Key("ENABLED").MustBool(false)


+ 2
- 0
routers/repo/cloudbrain.go View File

@@ -1397,6 +1397,8 @@ func SyncCloudbrainStatus() {
var maxDuration int64
if task.JobType == string(models.JobTypeBenchmark) {
maxDuration = setting.BenchmarkMaxDuration
} else if task.JobType == string(models.JobTypeSnn4imagenet) || task.JobType == string(models.JobTypeBrainScore) {
maxDuration = setting.ModelBenchmarkMaxDuration
} else {
maxDuration = setting.MaxDuration
}


Loading…
Cancel
Save