Fix classifier version for new caps
This commit is contained in:
parent
e7a54ec8ec
commit
289e927c6a
@ -71,10 +71,6 @@ final class CapServer {
|
||||
}
|
||||
}
|
||||
|
||||
var nextClassifierVersion: Int {
|
||||
caps.values.compactMap { $0.classifierVersion }.max() ?? 1
|
||||
}
|
||||
|
||||
var capCount: Int {
|
||||
caps.count
|
||||
}
|
||||
@ -469,7 +465,7 @@ final class CapServer {
|
||||
}
|
||||
var cap = cap
|
||||
cap.count = 0
|
||||
cap.classifierVersion = nextClassifierVersion
|
||||
cap.classifierVersion = nil
|
||||
caps[cap.id] = cap
|
||||
saveCapCountHTML()
|
||||
updateGridCapCount()
|
||||
@ -547,6 +543,7 @@ final class CapServer {
|
||||
.compactMap(Int.init)
|
||||
let version = classifierVersion
|
||||
for cap in trainedCaps {
|
||||
// Set current classifier
|
||||
if caps[cap]?.classifierVersion == nil {
|
||||
caps[cap]?.classifierVersion = version
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user