Spaces:
Running
Running
|
Download docs/EDIT_ABOUT_METRICS.md from vLAR/PhysInOne-Leaderboard: direct link, hf CLI and curl.
- Browser
- Download file 4.04 kB
-
https://huggingface.co/spaces/vLAR/PhysInOne-Leaderboard/resolve/main/docs/EDIT_ABOUT_METRICS.md
- Command line
-
hf download hf://spaces/vLAR/PhysInOne-Leaderboard/docs/EDIT_ABOUT_METRICS.md
-
curl -L -o EDIT_ABOUT_METRICS.md https://huggingface.co/spaces/vLAR/PhysInOne-Leaderboard/resolve/main/docs/EDIT_ABOUT_METRICS.md
4.04 kB
| # 维护 About this track & metrics | |
| 仅维护前端说明文字;不要为改文案而修改 Worker、成绩或任务标识。 | |
| ## 1. 修改位置 | |
| | 文件 | 函数或配置 | 负责内容 | | |
| |---|---|---| | |
| | `app.py` | `_render_subtask()` | 创建 About 手风琴,依次显示任务描述、指标说明、排名说明 | | |
| | `src/tasks/video_generation/__init__.py` | 四个 `TASK_VIDEO_GEN_*` 的 `description` | VG 四子任务描述 | | |
| | `src/tasks/task_future_prediction/__init__.py` | `TASK.description` | Future Prediction 描述 | | |
| | `src/tasks/property_estimation/__init__.py` | `TASK.description` | Physical Properties 描述 | | |
| | `src/tasks/motion_transfer/__init__.py` | `TASK.description` | Motion Transfer 描述 | | |
| | `src/display/metric_guide.py` | `metric_guide(task_name)` | 指标解释、材料误差解释及 Paper 链接 | | |
| | `app.py` | `_render_subtask()` 中 `Official ranking` 字符串 | 根据 `primary_metric`、显示名和方向生成排名提示 | | |
| `src/tasks/__init__.py` 注册这些 Task;改描述只编辑对应 `description`,不要改注册或回调。 | |
| ## 2. 修改已有介绍:以 PMF 为例 | |
| 打开 `src/display/metric_guide.py`,找到 `metric_guide()` 开头的 `text` 多行字符串。 | |
| 其中 `Physical Motion Fidelity (PMF)` 为完整名称和简称,`↑` 与 `Higher scores...` 表示越高越好。 | |
| 只替换这段英文,保持约一到两句;例如替换为: | |
| ```markdown | |
| **Physical Motion Fidelity (PMF) ↑** compares motion-frequency energy | |
| distributions with the reference video. Higher scores indicate more faithful motion. | |
| ``` | |
| 上例为 `text` 多行字符串内的 Markdown 段落;只替换 PMF 段落,其余内容保持不变。 | |
| PMF 的 Paper 链接在函数末尾 `return text + ...`: | |
| `[PhysInOne paper: PMF and physical material models](https://arxiv.org/abs/2604.09415)`。 | |
| 改链接时保留 Markdown 的 `[文字](URL)` 格式,并确认论文地址正确。 | |
| 若更正越高/越低的文案,先核对真实指标方向;不要顺便修改 `higher_is_better` 或评分配置。 | |
| 这里的文字名称不是榜单列头;文案变更不应重命名数据键或持久化字段。 | |
| ## 3. 增加介绍:以 SP IoU 为例 | |
| 1. 先在 `app.py::_render_subtask()` 确认该 Task 调用了 `metric_guide(task_name)`。 | |
| 2. 在函数共用 `text` 的 PhysIQ 小节新增或修改以下一行(SP IoU 已存在,不要重复添加): | |
| `- **SP IoU — Spatial IoU ↑:** compares motion regions regardless of timing. Higher is better.` | |
| 3. 复用该小节的 `[Physics-IQ paper](https://arxiv.org/abs/2501.09038)`,无需每行重复链接。 | |
| 4. 共用 `text` 会影响四大任务,包括 VG 的四个子任务;检查所有相关任务。 | |
| 5. 特定任务才需要的文字放在相应条件下:`task_future_prediction` 或 `propertyEstimation`。 | |
| 6. 展开 About,确认新段落、箭头、换行和链接显示正确。 | |
| **增加说明文字不等于增加评分指标。** 真正新增 Metric 数据列应参考 | |
| [`ADDING_EVALUATION_METRICS.md`](ADDING_EVALUATION_METRICS.md),不要在这里计算或补造分数。 | |
| ## 4. 验证 | |
| 在 Frontend 根目录、已安装项目依赖的 Python 环境中运行: | |
| ```powershell | |
| python frontend_view_improvements_regression.py | |
| python frontend_labels_refresh_regression.py | |
| python frontend_footer_about_browser_regression.py | |
| ``` | |
| 最后一项使用本地隔离合成数据和无头 Chrome,不连接生产;需要 Chrome、httpx、websockets。 | |
| 该测试沿用项目 Windows 浏览器测试路径 `C:\Program Files\Google\Chrome\Application\chrome.exe`。 | |
| 本机可用 `..\.venv-frontend\Scripts\python.exe` 代替 `python`,无需全局安装。 | |
| 浏览器测试检查四任务 About 展开、Paper 链接和任务专属段落;前两项检查文案及既有视图/刷新。 | |
| 人工复核:四任务分别展开 About,确认描述匹配、PMF/PhysIQ/材料说明正确、链接可点击。 | |
| 同时确认主榜排序与 Refresh、History 打开和滚动仍正常;不要提交真实任务来验证文案。 | |