Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions web/src/modules/docs/content/zh-CN/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
|---|---|---|
| 基本信息 | 服务名、命名空间 | 服务名同时用作 helm release、路由、伸缩器和 SLO 的名字;只能用小写字母、数字和 `-`,最多 53 个字符。**部署后不能修改** |
| 资源与调度 | 自动伸缩 / 副本数、GPU 型号、容忍 | 自动伸缩默认开启,由 LLMScaler 在上下限之间管理副本数 |
| 路由 | 发布路由、路由路径、并发上限 | 开启「发布路由」后,模型才能从网关和 Playground 调用 |
| SLO 与监控 | TTFT / TPS 阈值、ServiceMonitor | 扩缩容按 SLO 决定副本数 |
| 高级 | 覆盖镜像、模型路径、覆盖 YAML | 一般不需要修改 |
| 路由 | 发布路由、路由路径、SLO、TTFT / TPS 阈值、Monitor、ServiceMonitor | 控制请求如何进入推理实例,以及路由的服务目标和监控配置 |
| 高级 | 覆盖 YAML | 一般不需要修改 |

多数字段留空即可,沿用站点配置和 chart 的默认值。

Expand Down
6 changes: 0 additions & 6 deletions web/src/modules/inferences/components/DeployForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,6 @@ export function DeployForm({ form, onChange, upgrade, submitted, target, cluster
{sw("cart", f("cart"))}
</FloatingField>
<RouteExtras form={form} onChange={onChange} />
</>,
)}

{section(
"slo",
<>
<FloatingField layout="inline" label={f("slo")} hint={f("sloHint")}>
{sw("slo", f("slo"))}
</FloatingField>
Expand Down
2 changes: 1 addition & 1 deletion web/src/modules/inferences/components/DeploySheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type DeployTarget =

const KEEP = "__keep";
const ID_PREFIX = "deploy-sec-";
const OPEN: Record<Section, boolean> = { basic: true, resources: true, routing: false, slo: false, advanced: false };
const OPEN: Record<Section, boolean> = { 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 }) {
Expand Down
8 changes: 7 additions & 1 deletion web/src/modules/inferences/deploy-lib.test.ts
Original file line number Diff line number Diff line change
@@ -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>): 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"]);
Expand Down
2 changes: 1 addition & 1 deletion web/src/modules/inferences/deploy-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion web/src/modules/inferences/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@
"target": "Upgrade target",
"resources": "Resources and scheduling",
"routing": "Routing",
"slo": "SLO and monitoring",
"advanced": "Advanced"
},
"fields": {
Expand Down
1 change: 0 additions & 1 deletion web/src/modules/inferences/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@
"target": "升级目标",
"resources": "资源与调度",
"routing": "路由",
"slo": "SLO 与监控",
"advanced": "高级"
},
"fields": {
Expand Down
Loading