diff --git a/web/src/modules/docs/content/zh-CN/deploy.md b/web/src/modules/docs/content/zh-CN/deploy.md index 1579a1c..953535c 100644 --- a/web/src/modules/docs/content/zh-CN/deploy.md +++ b/web/src/modules/docs/content/zh-CN/deploy.md @@ -26,9 +26,8 @@ |---|---|---| | 基本信息 | 服务名、命名空间 | 服务名同时用作 helm release、路由、伸缩器和 SLO 的名字;只能用小写字母、数字和 `-`,最多 53 个字符。**部署后不能修改** | | 资源与调度 | 自动伸缩 / 副本数、GPU 型号、容忍 | 自动伸缩默认开启,由 LLMScaler 在上下限之间管理副本数 | -| 路由 | 发布路由、路由路径、并发上限 | 开启「发布路由」后,模型才能从网关和 Playground 调用 | -| SLO 与监控 | TTFT / TPS 阈值、ServiceMonitor | 扩缩容按 SLO 决定副本数 | -| 高级 | 覆盖镜像、模型路径、覆盖 YAML | 一般不需要修改 | +| 路由 | 发布路由、路由路径、SLO、TTFT / TPS 阈值、Monitor、ServiceMonitor | 控制请求如何进入推理实例,以及路由的服务目标和监控配置 | +| 高级 | 覆盖 YAML | 一般不需要修改 | 多数字段留空即可,沿用站点配置和 chart 的默认值。 diff --git a/web/src/modules/inferences/components/DeployForm.tsx b/web/src/modules/inferences/components/DeployForm.tsx index e5c2734..9bf3edd 100644 --- a/web/src/modules/inferences/components/DeployForm.tsx +++ b/web/src/modules/inferences/components/DeployForm.tsx @@ -171,12 +171,6 @@ export function DeployForm({ form, onChange, upgrade, submitted, target, cluster {sw("cart", f("cart"))} - , - )} - - {section( - "slo", - <> {sw("slo", f("slo"))} diff --git a/web/src/modules/inferences/components/DeploySheet.tsx b/web/src/modules/inferences/components/DeploySheet.tsx index 8c82e16..bf248d2 100644 --- a/web/src/modules/inferences/components/DeploySheet.tsx +++ b/web/src/modules/inferences/components/DeploySheet.tsx @@ -44,7 +44,7 @@ export type DeployTarget = const KEEP = "__keep"; const ID_PREFIX = "deploy-sec-"; -const OPEN: Record = { basic: true, resources: true, routing: false, slo: false, advanced: false }; +const OPEN: Record = { basic: true, resources: true, routing: false, advanced: false }; const REFRESH = [["status"], ["revisions"], ["releasePlan"], ["release-plan"], ["runs"], ["deployments"], ["objects"]]; export function DeploySheet({ target, onClose }: { target: DeployTarget | null; onClose: () => void }) { diff --git a/web/src/modules/inferences/deploy-lib.test.ts b/web/src/modules/inferences/deploy-lib.test.ts index 5539936..e2b1fb4 100644 --- a/web/src/modules/inferences/deploy-lib.test.ts +++ b/web/src/modules/inferences/deploy-lib.test.ts @@ -1,9 +1,15 @@ import { describe, expect, it } from "vitest"; import type { DiffResult, Plan } from "@swiss/lib/api"; -import { chartChoice, defaultServiceId, extraValue, fracOutOfRange, gpuOptions, initialValue, pipelineState, serviceIdError, whatMoves } from "@/modules/inferences/deploy-lib"; +import { SECTIONS, chartChoice, defaultServiceId, extraValue, fracOutOfRange, gpuOptions, initialValue, pipelineState, serviceIdError, whatMoves } from "@/modules/inferences/deploy-lib"; const diff = (over: Partial): DiffResult => ({ planHash: "h", changed: true, output: "", revision: 3, exists: true, ...over }); +describe("deploy sections", () => { + it("keeps SLO and monitoring controls in routing instead of a separate section", () => { + expect(SECTIONS).toEqual(["basic", "resources", "routing", "advanced"]); + }); +}); + describe("gpuOptions", () => { it("offers the supported products the cluster has, else all supported", () => { expect(gpuOptions(["H100", "A100"], ["A100", "L40"])).toEqual(["A100"]); diff --git a/web/src/modules/inferences/deploy-lib.ts b/web/src/modules/inferences/deploy-lib.ts index 1aba240..d6950b3 100644 --- a/web/src/modules/inferences/deploy-lib.ts +++ b/web/src/modules/inferences/deploy-lib.ts @@ -90,7 +90,7 @@ export function whatMoves(current: Plan, proposed: Plan, currentCatalog?: string ]; } -export const SECTIONS = ["basic", "resources", "routing", "slo", "advanced"] as const; +export const SECTIONS = ["basic", "resources", "routing", "advanced"] as const; export type Section = (typeof SECTIONS)[number]; // The service id names the helm release and the Services the chart renders diff --git a/web/src/modules/inferences/locales/en-US.json b/web/src/modules/inferences/locales/en-US.json index 6452293..e1c78e5 100644 --- a/web/src/modules/inferences/locales/en-US.json +++ b/web/src/modules/inferences/locales/en-US.json @@ -268,7 +268,6 @@ "target": "Upgrade target", "resources": "Resources and scheduling", "routing": "Routing", - "slo": "SLO and monitoring", "advanced": "Advanced" }, "fields": { diff --git a/web/src/modules/inferences/locales/zh-CN.json b/web/src/modules/inferences/locales/zh-CN.json index 43c67e6..e5fcec8 100644 --- a/web/src/modules/inferences/locales/zh-CN.json +++ b/web/src/modules/inferences/locales/zh-CN.json @@ -258,7 +258,6 @@ "target": "升级目标", "resources": "资源与调度", "routing": "路由", - "slo": "SLO 与监控", "advanced": "高级" }, "fields": {