make models only train one at the time closes #48

This commit is contained in:
2024-04-15 23:04:53 +01:00
parent 2318bad5d8
commit f4e70d7a73
11 changed files with 607 additions and 475 deletions

View File

@@ -5,7 +5,6 @@ import (
"errors"
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/db_types"
. "git.andr3h3nriqu3s.com/andr3/fyp/logic/utils"
)
type ModelClass struct {
@@ -15,8 +14,8 @@ type ModelClass struct {
Status int `json:"status"`
}
func ListClasses(c *Context, model_id string) (cls []*ModelClass, err error) {
return GetDbMultitple[ModelClass](c, "model_classes where model_id=$1", model_id)
func ListClasses(c BasePack, model_id string) (cls []*ModelClass, err error) {
return GetDbMultitple[ModelClass](c.GetDb(), "model_classes where model_id=$1", model_id)
}
func ModelHasDataPoints(db *sql.DB, model_id string) (result bool, err error) {