From e6f70479fbb526d48ada232edbf03e6176eb090c Mon Sep 17 00:00:00 2001 From: zouap Date: Fri, 14 Oct 2022 10:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8A=A5=E9=94=99=E5=9B=9E?= =?UTF-8?q?=E6=98=BE=E6=8E=92=E9=98=9F=E4=BF=A1=E6=81=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/aisafety.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/routers/repo/aisafety.go b/routers/repo/aisafety.go index 1320ad0db..9bb4b9dd4 100644 --- a/routers/repo/aisafety.go +++ b/routers/repo/aisafety.go @@ -978,6 +978,12 @@ func modelSafetyNewDataPrepare(ctx *context.Context) error { ctx.Data["CombatDataSetName"] = setting.ModelSafetyTest.GPUCombatDataSetName ctx.Data["CombatDataSetUUID"] = setting.ModelSafetyTest.GPUCombatDataSetUUID prepareCloudbrainOneSpecs(ctx) + + queuesDetail, _ := cloudbrain.GetQueuesDetail() + if queuesDetail != nil { + ctx.Data["QueuesDetail"] = queuesDetail + } + } else { ctx.Data["engine_id"] = ctx.QueryInt("engine_id") ctx.Data["pool_id"] = ctx.Query("pool_id") @@ -1002,6 +1008,9 @@ func modelSafetyNewDataPrepare(ctx *context.Context) error { } ctx.Data["engine_versions"] = versionInfos.Version prepareCloudbrainTwoInferenceSpecs(ctx) + + waitCount := cloudbrain.GetWaitingCloudbrainCount(models.TypeCloudBrainTwo, "") + ctx.Data["WaitCount"] = waitCount } return nil