提交 3c23b227 authored 作者: yujiejie's avatar yujiejie

821步骤一完成

上级 c684d05f
......@@ -76,136 +76,195 @@ var mentorState = {
// 阶段二部署验收:按学生 ID 索引的提交内容(原型 mock,与全局 studentState 解耦)
deploySubmissionsByStudent: {
1: {
taskType: 'text-model',
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'zhangsan-deploy-20260721.log',
apiUrl: 'http://connect.west-a.autodl.com',
apiPath: '/v1/chat/completions',
port: '22135',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-za8f-7f2c-4a91'
'text-model': {
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'zhangsan-deploy-20260721.log',
apiUrl: 'http://connect.west-a.autodl.com',
apiPath: '/v1/chat/completions',
port: '22135',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-za8f-7f2c-4a91'
},
log: {
fileName: 'zhangsan-deploy-20260721.log',
content: [
'[2026-07-21 09:12:04] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 09:13:20] [INFO] 拉取镜像 qwenllm/qwen2.5-7b-instruct:latest',
'[2026-07-21 09:15:46] [INFO] 模型权重加载完成,显存占用 14.8GB',
'[2026-07-21 09:16:02] [INFO] vLLM 服务启动,监听 0.0.0.0:22135',
'[2026-07-21 09:16:05] [INFO] OpenAI 兼容接口就绪:/v1/models, /v1/chat/completions',
'[2026-07-21 09:17:11] [INFO] 健康检查通过,返回 HTTP 200'
].join('\n')
},
report: {
taskName: '完成 Qwen2.5-7B 文本模型 OpenAI 兼容 API 的部署与验收',
process: '在 AutoDL 西北A区租赁 RTX 4090 实例,使用官方 Qwen2.5-7B 镜像创建容器,通过 vLLM 启动 OpenAI 兼容服务,并配置 22135 端口对外访问。',
issues: '首次启动时端口与预装服务冲突导致启动失败,通过修改容器端口映射解决;随后模型权重下载中断过一次,重新拉起后完成。',
selfTest: '使用 curl 访问 /v1/models 返回 200 且列表包含 qwen2.5-7b-instruct;调用 /v1/chat/completions 能正常返回中文回答。',
summary: '整体部署流程顺利,掌握了 vLLM 服务的启动参数与端口映射方法,后续应补充并发压测与进程守护配置。'
},
review: { status: '', comment: '', reviewedAt: '' }
},
log: {
fileName: 'zhangsan-deploy-20260721.log',
content: [
'[2026-07-21 09:12:04] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 09:13:20] [INFO] 拉取镜像 qwenllm/qwen2.5-7b-instruct:latest',
'[2026-07-21 09:15:46] [INFO] 模型权重加载完成,显存占用 14.8GB',
'[2026-07-21 09:16:02] [INFO] vLLM 服务启动,监听 0.0.0.0:22135',
'[2026-07-21 09:16:05] [INFO] OpenAI 兼容接口就绪:/v1/models, /v1/chat/completions',
'[2026-07-21 09:17:11] [INFO] 健康检查通过,返回 HTTP 200'
].join('\n')
},
report: {
taskName: '完成 Qwen2.5-7B 文本模型 OpenAI 兼容 API 的部署与验收',
process: '在 AutoDL 西北A区租赁 RTX 4090 实例,使用官方 Qwen2.5-7B 镜像创建容器,通过 vLLM 启动 OpenAI 兼容服务,并配置 22135 端口对外访问。',
issues: '首次启动时端口与预装服务冲突导致启动失败,通过修改容器端口映射解决;随后模型权重下载中断过一次,重新拉起后完成。',
selfTest: '使用 curl 访问 /v1/models 返回 200 且列表包含 qwen2.5-7b-instruct;调用 /v1/chat/completions 能正常返回中文回答。',
summary: '整体部署流程顺利,掌握了 vLLM 服务的启动参数与端口映射方法,后续应补充并发压测与进程守护配置。'
},
review: { status: '', comment: '', reviewedAt: '' }
'image-gen': {
artifactSubmitted: false,
reportSubmitted: false,
artifact: { fileName: '', apiUrl: '', apiPath: '/v1/generations', port: '', modelName: '', apiKey: '' },
log: { fileName: '', content: '' },
report: { taskName: '', process: '', issues: '', selfTest: '', summary: '' },
review: { status: '', comment: '', reviewedAt: '' }
}
},
2: {
taskType: 'text-model',
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'lisi-deploy-20260720.log',
apiUrl: 'http://connect.west-b.autodl.com',
apiPath: '/v1/chat/completions',
port: '22380',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-li4f-92cd-7712'
},
log: {
fileName: 'lisi-deploy-20260720.log',
content: [
'[2026-07-20 15:03:11] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 3090 (24GB)',
'[2026-07-20 15:04:32] [ERROR] CUDA out of memory:模型加载期间显存不足',
'[2026-07-20 15:04:33] [INFO] 尝试设置 gpu-memory-utilization=0.9 后重启',
'[2026-07-20 15:05:10] [ERROR] 服务启动失败,进程退出,请检查显存分配与模型大小',
'[2026-07-20 15:06:00] [INFO] 日志已停止,等待处理'
].join('\n')
},
report: {
taskName: '完成 Qwen2.5-7B 文本模型部署验收',
process: '租赁 AutoDL 实例后直接运行官方镜像,未预先检查显存占用情况。',
issues: '模型加载时 CUDA out of memory,调整 gpu-memory-utilization 后依然失败,怀疑是实例显存不足或镜像配置问题。',
selfTest: '服务未成功启动,未能完成自测。',
summary: '部署失败,需要排查显存配置并重新部署。'
'text-model': {
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'lisi-deploy-20260720.log',
apiUrl: 'http://connect.west-b.autodl.com',
apiPath: '/v1/chat/completions',
port: '22380',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-li4f-92cd-7712'
},
log: {
fileName: 'lisi-deploy-20260720.log',
content: [
'[2026-07-20 15:03:11] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 3090 (24GB)',
'[2026-07-20 15:04:32] [ERROR] CUDA out of memory:模型加载期间显存不足',
'[2026-07-20 15:04:33] [INFO] 尝试设置 gpu-memory-utilization=0.9 后重启',
'[2026-07-20 15:05:10] [ERROR] 服务启动失败,进程退出,请检查显存分配与模型大小',
'[2026-07-20 15:06:00] [INFO] 日志已停止,等待处理'
].join('\n')
},
report: {
taskName: '完成 Qwen2.5-7B 文本模型部署验收',
process: '租赁 AutoDL 实例后直接运行官方镜像,未预先检查显存占用情况。',
issues: '模型加载时 CUDA out of memory,调整 gpu-memory-utilization 后依然失败,怀疑是实例显存不足或镜像配置问题。',
selfTest: '服务未成功启动,未能完成自测。',
summary: '部署失败,需要排查显存配置并重新部署。'
},
review: {
round: 1,
status: '已驳回',
artifactStatus: '通过',
reportStatus: '驳回',
comment: '服务未能成功启动,日志显示 CUDA 显存不足导致模型加载中断。请检查实例配置,调整 gpu-memory-utilization 参数或更换更高显存实例后重新部署并提交。',
reviewedAt: '2026-07-20 17:40',
notifiedAt: '2026-07-20 17:40'
}
},
review: {
round: 1,
status: '已驳回',
artifactStatus: '通过',
reportStatus: '驳回',
comment: '服务未能成功启动,日志显示 CUDA 显存不足导致模型加载中断。请检查实例配置,调整 gpu-memory-utilization 参数或更换更高显存实例后重新部署并提交。',
reviewedAt: '2026-07-20 17:40',
notifiedAt: '2026-07-20 17:40'
'image-gen': {
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'lisi-image-deploy-20260722.log',
apiUrl: 'http://connect.west-b.autodl.com',
apiPath: '/v1/generations',
port: '7861',
modelName: 'qwen-image-2.0',
apiKey: 'sk-li4f-92cd-7712'
},
log: {
fileName: 'lisi-image-deploy-20260722.log',
content: [
'[2026-07-22 16:20:10] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-22 16:22:35] [INFO] 加载 Qwen-Image 2.0 图像生成模型,显存占用 16.3GB',
'[2026-07-22 16:23:12] [INFO] 图像服务启动,监听 0.0.0.0:7861',
'[2026-07-22 16:23:15] [INFO] 接口就绪:/v1/models, /v1/generations',
'[2026-07-22 16:25:40] [INFO] 提交测试生成任务成功,任务 ID:gen-9b41d7',
'[2026-07-22 16:26:05] [INFO] 任务轮询至 succeeded,图片已生成'
].join('\n')
},
report: {
taskName: '完成 Qwen-Image 2.0 图像生成服务的部署与验收',
process: '租赁 AutoDL RTX 4090 实例,部署 Qwen-Image 2.0 图像生成服务,开放 7861 端口,配置异步生成任务接口。',
issues: '吸取文本任务显存不足的教训,启动前先评估模型显存需求(约 16.3GB / 24GB),本次部署一次成功。',
selfTest: '提交生成任务返回 202 与任务 ID,轮询任务状态最终 succeeded,图片可正常下载查看。',
summary: '本次部署顺利,掌握了图像生成服务的异步任务机制,也验证了提前评估显存的重要性。'
},
review: { status: '', comment: '', reviewedAt: '' }
}
},
3: {
taskType: 'image-gen',
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'wangwu-image-deploy-20260721.log',
apiUrl: 'http://connect.west-c.autodl.com',
apiPath: '/v1/generations',
port: '6006',
modelName: 'sd-xl-base-1.0',
apiKey: 'sk-wan5-31de-88ab'
},
log: {
fileName: 'wangwu-image-deploy-20260721.log',
content: [
'[2026-07-21 10:20:15] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 10:22:40] [INFO] 加载 Stable Diffusion XL 模型权重,显存占用 11.2GB',
'[2026-07-21 10:23:18] [INFO] 图像生成服务启动,监听 0.0.0.0:6006',
'[2026-07-21 10:23:20] [INFO] 接口就绪:/v1/models, /v1/generations',
'[2026-07-21 10:25:02] [INFO] 提交测试生成任务成功,任务 ID:gen-8f3a2c'
].join('\n')
'image-gen': {
artifactSubmitted: true,
reportSubmitted: true,
artifact: {
fileName: 'wangwu-image-deploy-20260721.log',
apiUrl: 'http://connect.west-c.autodl.com',
apiPath: '/v1/generations',
port: '6006',
modelName: 'sd-xl-base-1.0',
apiKey: 'sk-wan5-31de-88ab'
},
log: {
fileName: 'wangwu-image-deploy-20260721.log',
content: [
'[2026-07-21 10:20:15] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 10:22:40] [INFO] 加载 Stable Diffusion XL 模型权重,显存占用 11.2GB',
'[2026-07-21 10:23:18] [INFO] 图像生成服务启动,监听 0.0.0.0:6006',
'[2026-07-21 10:23:20] [INFO] 接口就绪:/v1/models, /v1/generations',
'[2026-07-21 10:25:02] [INFO] 提交测试生成任务成功,任务 ID:gen-8f3a2c'
].join('\n')
},
report: {
taskName: '完成 Stable Diffusion XL 图像生成服务的部署与验收',
process: '在 AutoDL 西北C区租赁 RTX 4090 实例,部署 SDXL 服务并开放 6006 端口,配置异步生成任务接口。',
issues: '首次提交生成任务时返回 404,原因是请求路径拼写错误,修正为 /v1/generations 后正常。',
selfTest: '提交生成任务返回 202 与任务 ID,轮询任务状态最终 succeeded,图片可正常下载。',
summary: '掌握了图像生成服务的异步任务机制与轮询逻辑。'
},
review: { status: '', comment: '', reviewedAt: '' }
},
report: {
taskName: '完成 Stable Diffusion XL 图像生成服务的部署与验收',
process: '在 AutoDL 西北C区租赁 RTX 4090 实例,部署 SDXL 服务并开放 6006 端口,配置异步生成任务接口。',
issues: '首次提交生成任务时返回 404,原因是请求路径拼写错误,修正为 /v1/generations 后正常。',
selfTest: '提交生成任务返回 202 与任务 ID,轮询任务状态最终 succeeded,图片可正常下载。',
summary: '掌握了图像生成服务的异步任务机制与轮询逻辑。'
},
review: { status: '', comment: '', reviewedAt: '' }
'text-model': {
artifactSubmitted: false,
reportSubmitted: false,
artifact: { fileName: '', apiUrl: '', apiPath: '/v1/chat/completions', port: '', modelName: '', apiKey: '' },
log: { fileName: '', content: '' },
report: { taskName: '', process: '', issues: '', selfTest: '', summary: '' },
review: { status: '', comment: '', reviewedAt: '' }
}
},
4: {
taskType: 'text-model',
artifactSubmitted: true,
reportSubmitted: false,
artifact: {
fileName: 'zhaoliu-deploy-20260721.log',
apiUrl: 'http://connect.west-d.autodl.com',
apiPath: '/v1/chat/completions',
port: '22401',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-zha6-44de-1198'
'text-model': {
artifactSubmitted: true,
reportSubmitted: false,
artifact: {
fileName: 'zhaoliu-deploy-20260721.log',
apiUrl: 'http://connect.west-d.autodl.com',
apiPath: '/v1/chat/completions',
port: '22401',
modelName: 'qwen2.5-7b-instruct',
apiKey: 'sk-zha6-44de-1198'
},
log: {
fileName: 'zhaoliu-deploy-20260721.log',
content: [
'[2026-07-21 14:02:10] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 14:04:33] [INFO] 模型权重加载完成,显存占用 15.1GB',
'[2026-07-21 14:05:01] [INFO] vLLM 服务启动,监听 0.0.0.0:22401',
'[2026-07-21 14:06:12] [INFO] 健康检查通过,返回 HTTP 200'
].join('\n')
},
report: {
taskName: '',
process: '',
issues: '',
selfTest: '',
summary: ''
},
review: { status: '', comment: '', reviewedAt: '' }
},
log: {
fileName: 'zhaoliu-deploy-20260721.log',
content: [
'[2026-07-21 14:02:10] [INFO] AutoDL 实例启动成功,GPU:NVIDIA GeForce RTX 4090 (24GB)',
'[2026-07-21 14:04:33] [INFO] 模型权重加载完成,显存占用 15.1GB',
'[2026-07-21 14:05:01] [INFO] vLLM 服务启动,监听 0.0.0.0:22401',
'[2026-07-21 14:06:12] [INFO] 健康检查通过,返回 HTTP 200'
].join('\n')
},
report: {
taskName: '',
process: '',
issues: '',
selfTest: '',
summary: ''
},
review: { status: '', comment: '', reviewedAt: '' }
'image-gen': {
artifactSubmitted: false,
reportSubmitted: false,
artifact: { fileName: '', apiUrl: '', apiPath: '/v1/generations', port: '', modelName: '', apiKey: '' },
log: { fileName: '', content: '' },
report: { taskName: '', process: '', issues: '', selfTest: '', summary: '' },
review: { status: '', comment: '', reviewedAt: '' }
}
}
},
pendingTasks: [
......@@ -1419,13 +1478,31 @@ function mentorDeployReviewEsc(s) {
});
}
function getMentorDeploySubmission(studentId) {
function getMentorDeployTaskKey(studentId) {
// 显式切换任务后以全局 activeTask 为准;未切换时自动选择当前学生「有提交内容」的任务,保证页面默认展示有效内容
if (mentorDeployReviewState && mentorDeployReviewState.activeTask) return mentorDeployReviewState.activeTask;
var sid = Number(studentId);
if (sid) {
var s = (mentorState.deploySubmissionsByStudent || {})[sid];
if (s) {
var order = ['text-model', 'image-gen'];
for (var i = 0; i < order.length; i++) {
var t = s[order[i]];
if (t && (t.artifactSubmitted || t.reportSubmitted || (t.review && t.review.status))) return order[i];
}
}
}
return 'text-model';
}
function getMentorDeploySubmission(studentId, taskKey) {
var subs = mentorState.deploySubmissionsByStudent || {};
return subs[Number(studentId)] || null;
var s = subs[Number(studentId)];
return s ? (s[taskKey || getMentorDeployTaskKey(studentId)] || null) : null;
}
function getMentorDeployStudentStatus(studentId) {
var sub = getMentorDeploySubmission(studentId);
function getMentorDeployStudentStatus(studentId, taskKey) {
var sub = getMentorDeploySubmission(studentId, taskKey);
if (!sub) return '未提交';
if (sub.review && sub.review.status) return sub.review.status;
if (sub.artifactSubmitted && sub.reportSubmitted) return '待验收';
......@@ -1433,8 +1510,8 @@ function getMentorDeployStudentStatus(studentId) {
return '未提交';
}
function isMentorDeployReviewLocked(studentId) {
var sub = getMentorDeploySubmission(studentId);
function isMentorDeployReviewLocked(studentId, taskKey) {
var sub = getMentorDeploySubmission(studentId, taskKey);
if (!sub || !sub.review || !sub.review.status) return false;
// 只有导师真正提交的验收结论(已通过/已驳回/待补充)才锁定,「待验收」仍可编辑
return sub.review.status !== '待验收';
......@@ -1453,13 +1530,13 @@ function getMentorDeployStatusBadge(status) {
return map[status] || 'bg-amber-100 text-amber-700';
}
function getMentorDeployTaskTypeLabel(studentId) {
var sub = getMentorDeploySubmission(studentId);
return (sub && sub.taskType === 'image-gen') ? '图像生成任务' : '文本模型任务';
function getMentorDeployTaskTypeLabel(studentId, taskKey) {
var tk = taskKey || getMentorDeployTaskKey(studentId);
return tk === 'image-gen' ? '图像生成任务' : '文本模型任务';
}
function getMentorDeployCompletenessLabel(studentId) {
var sub = getMentorDeploySubmission(studentId);
function getMentorDeployCompletenessLabel(studentId, taskKey) {
var sub = getMentorDeploySubmission(studentId, taskKey);
if (!sub) return '产物未提交 · 报告未提交';
return (sub.artifactSubmitted ? '产物已提交' : '产物未提交') + ' · ' + (sub.reportSubmitted ? '报告已提交' : '报告未提交');
}
......@@ -2309,7 +2386,7 @@ function buildMentorDeployLockedReviewPanel(sid) {
var score = getMentorDeployReviewScores(sid);
var round = review.round || 1;
var tests = review.tests || {};
var taskType = sub.taskType || 'text-model';
var taskType = getMentorDeployTaskKey(sid);
var testSummaryHtml = buildMentorDeployReviewTestsSummary(tests, taskType);
var artifactStatus = review.artifactStatus || '';
var reportStatus = review.reportStatus || '';
......@@ -2395,8 +2472,8 @@ function buildMentorDeployReviewPanel(student) {
if (!student) return '';
var sid = Number(student.id);
var sub = getMentorDeploySubmission(sid);
var taskType = (sub && sub.taskType === 'image-gen') ? 'image-gen' : 'text-model';
var itemsHtml = taskType === 'image-gen' ? buildMentorDeployImageGenItems(sid) : buildMentorDeployTextModelItems(sid);
var taskKey = getMentorDeployTaskKey(sid);
var itemsHtml = taskKey === 'image-gen' ? buildMentorDeployImageGenItems(sid) : buildMentorDeployTextModelItems(sid);
var locked = isMentorDeployReviewLocked(sid);
var leftHtml = buildMentorDeployReviewHistoryHtml(sid) + buildMentorDeployParamsPanel(sid) + itemsHtml;
var rightHtml = locked ? buildMentorDeployLockedReviewPanel(sid) : buildMentorDeployScoreCard(sid) + buildMentorDeployConclusionPanel(sid);
......@@ -2409,7 +2486,7 @@ function buildMentorDeployReviewPanel(student) {
function getMentorDeployMissingApiTests(sid) {
var sub = getMentorDeploySubmission(sid);
var tests = mentorDeployReviewState.tests[sid] || {};
var config = (sub && sub.taskType === 'image-gen')
var config = (getMentorDeployTaskKey(sid) === 'image-gen')
? [{ k: 'models', label: '图像模型列表' }, { k: 'genSubmit', label: '提交生成任务' }, { k: 'genStatus', label: '查询生成任务' }]
: [{ k: 'models', label: '模型列表' }, { k: 'chat', label: '聊天补全' }];
var missing = [];
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论