Datasets:
Download code/evaluation-code/v0.2-0c2690ae/apps/console/web/src/verify.ts from VEHwang/cocogni4d: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/datasets/VEHwang/cocogni4d/resolve/main/code/evaluation-code/v0.2-0c2690ae/apps/console/web/src/verify.ts
- Command line
-
hf download hf://datasets/VEHwang/cocogni4d/code/evaluation-code/v0.2-0c2690ae/apps/console/web/src/verify.ts
-
curl -L -o verify.ts https://huggingface.co/datasets/VEHwang/cocogni4d/resolve/main/code/evaluation-code/v0.2-0c2690ae/apps/console/web/src/verify.ts
1.36 kB
| export const VERIFY_BLOCKS = [ | |
| ['generation', '生成'], ['selfcheck', '剧本自检'], ['conversion', '转换'], ['questions', '出题检查'], ['render', '渲染'], | |
| ] as const; | |
| export type VerifyBlock = {status: 'ok' | 'warn' | 'fail' | 'none'; summary: string; details: unknown; evidence: string[]; log_tail: string}; | |
| export type VerifySegment = {index: number; script_id: string | null; segment_id: string | null; state: string; reason: string | null; seconds: number | null; world: string; tier: string; n: string; observers: string; robots: string; checks: Record<typeof VERIFY_BLOCKS[number][0], VerifyBlock>}; | |
| export type VerifyReport = {schema: 'np-verify-report/1'; run_id: string; root_alias: string; status: string; generator_commit: string | null; segments: VerifySegment[]; errors: unknown; generic_reasons: unknown; evidence: string[]}; | |
| export const VERIFY_LABELS = {ok: '已有结果', warn: '需查看', fail: '失败', none: '无记录'}; | |
| export const VERIFY_COLORS = {ok: 'ok', warn: 'warn', fail: 'bad', none: ''}; | |
| export function evidenceURL(run: string, path: string) { | |
| return '/api/v1/np/runs/' + encodeURIComponent(run) + '/file?' + new URLSearchParams({path}); | |
| } | |
| export function reviewSegmentId(report: VerifyReport, row: VerifySegment) { | |
| return row.segment_id || (row.script_id ? report.root_alias + '/' + row.script_id : null); | |
| } | |