ixim commited on
Commit
9737648
·
verified ·
1 Parent(s): 6f8c80a

Allow reproducibility runs without an optional hardware snapshot

Browse files
Files changed (2) hide show
  1. MANIFEST.json +2 -2
  2. scripts/model_card.py +7 -3
MANIFEST.json CHANGED
@@ -396,8 +396,8 @@
396
  },
397
  {
398
  "path": "scripts/model_card.py",
399
- "size": 13708,
400
- "sha256": "93839adc07c6b4400ad493f3400c7d0bf03e3673f83a25820e80c7c6fba731cd"
401
  },
402
  {
403
  "path": "scripts/provenance.py",
 
396
  },
397
  {
398
  "path": "scripts/model_card.py",
399
+ "size": 14003,
400
+ "sha256": "38d818796d56681c84f28281cc2f1cd699746d5fd410e1aa312f9ae2e445c41d"
401
  },
402
  {
403
  "path": "scripts/provenance.py",
scripts/model_card.py CHANGED
@@ -70,7 +70,11 @@ def render_details(evaluation, platform):
70
  core, extra = groups
71
  rows = [(g, row) for g in groups for row in g[3]]
72
  count = len(rows)
73
- hardware = json.loads((root / 'hardware.json').read_text())
 
 
 
 
74
  extra_summary = json.loads((root / 'young_woman/summary.json').read_text())
75
  lines = [tr('### Evaluation scope and runtime', '### 评测范围与运行环境'), '',
76
  tr(f'The original suite has {len(core[3])} pairs; the separate portrait supplement has {len(extra[3])} pairs. '
@@ -80,8 +84,8 @@ def render_details(evaluation, platform):
80
  '**点击任意样图即可打开原尺寸 PNG 大图。** 所有图片均为实际推理输出,没有裁剪、修图或使用其他模型替代。'), '',
81
  tr('| Setting | Recorded value |', '| 设置 | 实测记录 |'), '|---|---|',
82
  f'| GPU | {core[2]["bf16"]["gpu"]} |',
83
- tr('| Driver / board memory | ', '| 驱动 / 板载显存 | ') + hardware['gpu_driver_memory'].split(', ',1)[1].replace(', ', ' / ') + ' MiB |',
84
- tr('| System RAM | ', '| 系统内存 | ') + f'{hardware["system_ram_bytes"]/2**30:.1f} GiB |',
85
  f'| OS | {core[2]["bf16"]["platform"]} |',
86
  f'| Python / CUDA | {core[2]["bf16"]["python"]} / {core[2]["bf16"]["cuda"]} |',
87
  tr('| Generation | 1024×1024; 40 steps; CFG 1.0; KV cache enabled |', '| 生成设置 | 1024×1024;40 步;CFG 1.0;启用 KV 缓存 |'),
 
70
  core, extra = groups
71
  rows = [(g, row) for g in groups for row in g[3]]
72
  count = len(rows)
73
+ hardware_path = root / 'hardware.json'
74
+ hardware = json.loads(hardware_path.read_text()) if hardware_path.exists() else {}
75
+ gpu_detail = hardware.get('gpu_driver_memory', '').split(', ', 1)
76
+ driver_memory = gpu_detail[1].replace(', ', ' / ') + ' MiB' if len(gpu_detail) == 2 else tr('Not recorded', '未记录')
77
+ ram = f'{hardware["system_ram_bytes"]/2**30:.1f} GiB' if hardware.get('system_ram_bytes') else tr('Not recorded', '未记录')
78
  extra_summary = json.loads((root / 'young_woman/summary.json').read_text())
79
  lines = [tr('### Evaluation scope and runtime', '### 评测范围与运行环境'), '',
80
  tr(f'The original suite has {len(core[3])} pairs; the separate portrait supplement has {len(extra[3])} pairs. '
 
84
  '**点击任意样图即可打开原尺寸 PNG 大图。** 所有图片均为实际推理输出,没有裁剪、修图或使用其他模型替代。'), '',
85
  tr('| Setting | Recorded value |', '| 设置 | 实测记录 |'), '|---|---|',
86
  f'| GPU | {core[2]["bf16"]["gpu"]} |',
87
+ tr('| Driver / board memory | ', '| 驱动 / 板载显存 | ') + driver_memory + ' |',
88
+ tr('| System RAM | ', '| 系统内存 | ') + ram + ' |',
89
  f'| OS | {core[2]["bf16"]["platform"]} |',
90
  f'| Python / CUDA | {core[2]["bf16"]["python"]} / {core[2]["bf16"]["cuda"]} |',
91
  tr('| Generation | 1024×1024; 40 steps; CFG 1.0; KV cache enabled |', '| 生成设置 | 1024×1024;40 步;CFG 1.0;启用 KV 缓存 |'),