Browse Source

server: fix panic when runner.Options is nil (#10566)

jmorganca/cuda-compression-none
Jeffrey Morgan 1 year ago
committed by GitHub
parent
commit
1703d1472e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      server/sched.go

4
server/sched.go

@ -691,11 +691,13 @@ func (runner *runnerRef) LogValue() slog.Value {
attrs = append(attrs,
slog.String("size", format.HumanBytes2(runner.estimatedTotal)),
slog.String("vram", format.HumanBytes2(runner.estimatedVRAM)),
slog.Int("num_ctx", runner.NumCtx),
slog.Int("parallel", runner.numParallel),
slog.Int("pid", runner.pid),
slog.String("model", runner.modelPath),
)
if runner.Options != nil {
attrs = append(attrs, slog.Int("num_ctx", runner.Options.NumCtx))
}
return slog.GroupValue(attrs...)
}

Loading…
Cancel
Save