Files
FacereDataset/docs/sources/hf_bshada_open_schematics.md
Zhang Jiahao ba501c328c Remove personal name from suggestion/decision phrasing
Why:
- "给 Charles 的建议"、"待 Charles 拍板"、"需要 Charles 决策" 这些写法
  把具体人绑到了文档里,换维护者就失准。改成中性的 "建议 / 待决策 /
  待拍板",文档对未来协作者和 agent 都更通用。

What:
- log.md: 四处去掉 "给 Charles / 还是需要 Charles 决策 / 等 Charles 拍板"
- plan.md: 三处去掉 "待 Charles / Charles 定目标 / 需要 Charles 定"
- docs/sources/hf_bshada_open_schematics.md: "待 Charles 决策" → "待决策"
- scripts/estimate_size.py: docstring 去掉 "给 Charles 一个估计"
- CLAUDE.md: 数据删除确认规则从 "先跟 Charles 确认" 改成 "先跟用户确认"

保留的 Charles 提及都是事实性的:
- README/plan 里的 "维护者:Charles"(身份字段)
- log.md 历史条目里 "Charles 要求..." / "Charles 点名..."(历史事件记录)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 20:01:52 +08:00

108 lines
4.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HF Dataset: bshada/open-schematics
**URL**https://huggingface.co/datasets/bshada/open-schematics
**调研日期**2026-04-23
**性质**:第三方**已预处理**数据集(非待爬网站),镜像导入。
## 概要
| 字段 | 值 |
|------|---|
| 作者 | bshada |
| License | **CC-BY-4.0** |
| 更新 | 2025-12-17 |
| 下载量 | 1 769 |
| Likes | 160 |
| 规模 | 10K 100K 条 (tag `size_categories: 10K<n<100K`) |
| 存储 | 78 parquet shards, **6.4 GB** (`data/train-000XX-of-00078.parquet`) |
| 封面 | `open-schematics.png` (6.2 MB) |
| Tags | kicad, schematics, pcb, electronics, hardware, circuit-design |
## 数据结构(每条记录)
| 字段 | 类型 | 说明 |
|------|------|------|
| `schematic` | string | 原始 schematic 文件内容(主要是 `.kicad_sch` |
| `image` | image (PNG) | schematic 渲染图 |
| `components_used` | list[string] | 元件名列表(从 library symbol 提取) |
| `json` | string | JSON 结构化表示 |
| `yaml` | string | YAML 元数据 |
| `name` | string | 项目名 |
| `description` | string | 项目描述 |
| `type` | string | 文件扩展名 (`.kicad_sch` 等) |
数据来源:公开硬件 repo作者未列具体来源已做以下处理
- 空 schematic无元件/符号)过滤
- 元件名从 library symbol 抽取
- 生成可视化 PNG
- 多格式raw / JSON / YAML并存
## 为什么值得纳入
1. **即用**:已结构化,训练 `text → schematic` / `image → components` / `schematic → description` 几类 SFT 都能直接用
2. **KiCad 原生**:补上我们 oshwhub 路径EasyEDA以外的主流 EDA 生态
3. **License 好**CC-BY-4.0,商用仅需署名
4. **小**6.4 GB vs oshwhub 全量估算 110 GB边际成本可接受
## 接入方案Option A镜像
**不按"每项目一文件夹"解**,因为这是整包发布的数据集,记录 10K+,拆细反而破坏结构。
目录:
```
data/external/huggingface/bshada--open-schematics/
├── README.md # 原作者 README
├── ATTRIBUTION.md # 我方追加:来源 + license + crawled_at
├── open-schematics.png # 封面LFS
├── data/*.parquet # 78 shardsLFS
└── _source.json # HF API 元数据快照sha / lastModified / downloads / tags
```
下载方式:
```bash
# 用 huggingface-cliuv 装 hf_hub或 datasets 库,断点续
uv pip install huggingface_hub
huggingface-cli download bshada/open-schematics \
--repo-type dataset \
--local-dir data/external/huggingface/bshada--open-schematics
```
或轻量走 `hf_hub_download` + 循环:
```python
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="bshada/open-schematics",
repo_type="dataset",
local_dir="data/external/huggingface/bshada--open-schematics",
)
```
## .gitattributes 改动
```
data/external/**/*.parquet filter=lfs diff=lfs merge=lfs -text
data/external/**/*.png filter=lfs diff=lfs merge=lfs -text
```
## 下游消费
我们的 `scripts/build_index.py` 目前按 `data/raw/*/*/metadata.json` 汇总,
不会自动收录这个。需要:
-`build_index.py` 加一个 external datasets 段(从 `_source.json` 读)
- 或者单独维护 `datasets.md`
推荐:**单独 `datasets.md`**,因为 per-project 索引和 HF 包索引是两种不同物种,合并反而乱。
## 风险
- **License 署名**:下游产出(模型 card / 论文)必须标注 "This dataset uses schematics from bshada/open-schematics (CC-BY-4.0)"。加 `ATTRIBUTION.md` 落地
- **数据来源不透明**:作者没公开具体来源 repo 列表,去重时无法对齐到上游项目(可能与 oshwhub / KiCad repo 的部分项目重叠)
- **KiCad 版本**`.kicad_sch` 语法随 KiCad 5/6/7/8 大改,没有版本标注 → 下游若要 round-trip 需探测
## 待决策
1. 6.4 GB LFS 预算批准吗?
2. 如果 oshwhub 放量 + HF 镜像并行Gitea 实例磁盘要确认(之前已标记:需 `df -h` 看容量)
3. 立刻拉还是排到 oshwhub 放量之后?