Commit ·
5117960
0
Parent(s):
Duplicate from FactoryBench/FactoryBench
Browse filesCo-authored-by: FactoryBench <FactoryBench@users.noreply.huggingface.co>
- .gitattributes +80 -0
- README.md +225 -0
- factorybench_lite/level_1.jsonl +0 -0
- factorybench_lite/level_2.jsonl +3 -0
- factorybench_lite/level_3.jsonl +3 -0
- factorybench_lite/level_4.jsonl +3 -0
- factorybench_qa/level_1.jsonl +3 -0
- factorybench_qa/level_2.jsonl +3 -0
- factorybench_qa/level_3.jsonl +3 -0
- factorybench_qa/level_4.jsonl +3 -0
- factorywave/episodes.parquet +3 -0
- factorywave/flow.parquet +3 -0
- factorywave/kuka_signals.parquet +3 -0
- factorywave/ur_screwdriver_signals.parquet +3 -0
- factorywave/ur_signals.parquet +3 -0
- factorywave/ur_signals_10hz.parquet +3 -0
- knowledge_graph/SCHEMA.md +147 -0
- knowledge_graph/knowledge_graph.json +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.avro filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.lz4 filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.mds filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
# Audio files - uncompressed
|
| 40 |
+
*.pcm filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
*.sam filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
*.raw filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
# Audio files - compressed
|
| 44 |
+
*.aac filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
*.flac filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
# Image files - uncompressed
|
| 50 |
+
*.bmp filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
*.tiff filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
# Image files - compressed
|
| 55 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
# Video files - compressed
|
| 59 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
factorybench_qa/level_1/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
factorybench_qa/level_1/validation.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
factorybench_qa/level_1/test.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
factorybench_qa/level_2/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
factorybench_qa/level_2/validation.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
factorybench_qa/level_2/test.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
factorybench_qa/level_3/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
factorybench_qa/level_3/test.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
factorybench_qa/level_4/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
factorybench_qa/level_4/validation.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
factorybench_qa/level_4/test.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
factorybench_lite/level_2/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
factorybench_lite/level_3/train.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
factorybench_qa/level_1.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
factorybench_qa/level_2.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
factorybench_qa/level_3.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
factorybench_qa/level_4.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
factorybench_lite/level_2.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
factorybench_lite/level_3.jsonl filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
factorybench_lite/level_4.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
task_categories:
|
| 6 |
+
- question-answering
|
| 7 |
+
- time-series-forecasting
|
| 8 |
+
tags:
|
| 9 |
+
- robotics
|
| 10 |
+
- industrial
|
| 11 |
+
- time-series
|
| 12 |
+
- causal-reasoning
|
| 13 |
+
- benchmark
|
| 14 |
+
- machine-understanding
|
| 15 |
+
pretty_name: FactoryBench
|
| 16 |
+
size_categories:
|
| 17 |
+
- 10K<n<100K
|
| 18 |
+
configs:
|
| 19 |
+
- config_name: level_1
|
| 20 |
+
data_files:
|
| 21 |
+
- split: train
|
| 22 |
+
path: factorybench_qa/level_1.jsonl
|
| 23 |
+
- config_name: level_2
|
| 24 |
+
data_files:
|
| 25 |
+
- split: train
|
| 26 |
+
path: factorybench_qa/level_2.jsonl
|
| 27 |
+
- config_name: level_3
|
| 28 |
+
data_files:
|
| 29 |
+
- split: train
|
| 30 |
+
path: factorybench_qa/level_3.jsonl
|
| 31 |
+
- config_name: level_4
|
| 32 |
+
data_files:
|
| 33 |
+
- split: train
|
| 34 |
+
path: factorybench_qa/level_4.jsonl
|
| 35 |
+
- config_name: lite_level_1
|
| 36 |
+
data_files:
|
| 37 |
+
- split: train
|
| 38 |
+
path: factorybench_lite/level_1.jsonl
|
| 39 |
+
- config_name: lite_level_2
|
| 40 |
+
data_files:
|
| 41 |
+
- split: train
|
| 42 |
+
path: factorybench_lite/level_2.jsonl
|
| 43 |
+
- config_name: lite_level_3
|
| 44 |
+
data_files:
|
| 45 |
+
- split: train
|
| 46 |
+
path: factorybench_lite/level_3.jsonl
|
| 47 |
+
- config_name: lite_level_4
|
| 48 |
+
data_files:
|
| 49 |
+
- split: train
|
| 50 |
+
path: factorybench_lite/level_4.jsonl
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
# FactoryBench
|
| 54 |
+
|
| 55 |
+
FactoryBench is a benchmark for evaluating **machine-behavior reasoning** in time-series models and LLMs over industrial robotic telemetry. Question-answer pairs are organised along the four levels of Pearl's causal hierarchy:
|
| 56 |
+
|
| 57 |
+
| Level | Capability | Example |
|
| 58 |
+
|-------|-----------|---------|
|
| 59 |
+
| **L1 — State** | Identify the operational state from raw signals | "Which fault, if any, is occurring in this episode?" |
|
| 60 |
+
| **L2 — Intervention** | Predict the effect of an intervention | "How would the joint torques change if the payload were doubled?" |
|
| 61 |
+
| **L3 — Counterfactual** | Reason about alternative histories | "Would the collision still have occurred if the speed had been 50% lower?" |
|
| 62 |
+
| **L4 — Decision** | Engineering decision-making (troubleshooting + optimisation) | "Given this anomaly, what is the most likely root cause and remediation?" |
|
| 63 |
+
|
| 64 |
+
The benchmark is grounded in **FactoryWave**, a dense multivariate telemetry dataset collected from a UR3 collaborative robot (125 Hz) and a KUKA KR10 industrial arm (83 Hz), supplemented with the AURSAD and voraus-AD open-source datasets.
|
| 65 |
+
|
| 66 |
+
## Dataset summary
|
| 67 |
+
|
| 68 |
+
- **69,691 Q&A pairs** across four causal levels, released as a single undivided pool (the public release is not split into train/validation/test).
|
| 69 |
+
- **FactoryBench-Lite**: a balanced 3,000-item subset for cheap evaluation, even across templates and within each template on the dimension that determines its answer.
|
| 70 |
+
- **5 answer formats**: single-select MCQ, multi-select MCQ, ranking, tensor/numerical, free-form (judged by an LLM-as-judge voting protocol).
|
| 71 |
+
- **Telemetry from real industrial robots** with systematic fault injection (27 atomic mechanisms across pick-and-place, screwing, and peg-in-hole tasks).
|
| 72 |
+
|
| 73 |
+
## Repository layout
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
FactoryBench/
|
| 77 |
+
├── factorybench_qa/ # Question-answer pairs (full pool)
|
| 78 |
+
│ ├── level_1.jsonl
|
| 79 |
+
│ ├── level_2.jsonl
|
| 80 |
+
│ ├── level_3.jsonl
|
| 81 |
+
│ └── level_4.jsonl
|
| 82 |
+
├── factorybench_lite/ # Balanced 3,000-item evaluation subset
|
| 83 |
+
│ ├── level_1.jsonl
|
| 84 |
+
│ ├── level_2.jsonl
|
| 85 |
+
│ ├── level_3.jsonl
|
| 86 |
+
│ └── level_4.jsonl
|
| 87 |
+
├── knowledge_graph/ # Combined knowledge graph
|
| 88 |
+
│ ├── knowledge_graph.json # Machines, grippers, tasks, events, faults, anomalies, error→protocol map, relevance specs
|
| 89 |
+
│ └── SCHEMA.md # Field-level schema documentation
|
| 90 |
+
└── factorywave/ # Underlying telemetry & metadata
|
| 91 |
+
├── episodes.parquet # Episode-level metadata (9,728 episodes)
|
| 92 |
+
├── flow.parquet # Task flow definitions
|
| 93 |
+
├── kuka_signals.parquet # KUKA KR10 signals (~83 Hz, 1,428 episodes)
|
| 94 |
+
├── ur_signals.parquet # UR3 signals (~125 Hz, 3,076 episodes)
|
| 95 |
+
├── ur_signals_10hz.parquet # UR3 signals (10 Hz, 3,984 episodes — disjoint from ur_signals)
|
| 96 |
+
└── ur_screwdriver_signals.parquet # UR3 screwdriver subset (~125 Hz, 1,240 episodes)
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
> **Note on UR coverage.** `ur_signals.parquet` (~125 Hz) and `ur_signals_10hz.parquet` (10 Hz) cover **disjoint** UR3 episode subsets — no episode appears in both files. Together they span 7,060 distinct UR3 episodes; `ur_screwdriver_signals.parquet` adds another 1,240 screwdriver-task episodes. Each row in `episodes.parquet` corresponds to exactly one signal table.
|
| 100 |
+
|
| 101 |
+
## Knowledge graph
|
| 102 |
+
|
| 103 |
+
`knowledge_graph/knowledge_graph.json` is the structured "world model" that grounds FactoryBench Q&A items: machine and gripper capability tables, the task/event vocabulary, the fault root-cause catalogue, the observable-anomaly catalogue, the error→protocol mapping used to derive ground-truth answers for L4 troubleshooting items, an anomaly severity ranking, and the relevance specs that drive fault-aware sub-series sampling. See [`knowledge_graph/SCHEMA.md`](https://huggingface.co/datasets/FactoryBench/FactoryBench/blob/main/knowledge_graph/SCHEMA.md) for field-level documentation.
|
| 104 |
+
|
| 105 |
+
```python
|
| 106 |
+
import json, urllib.request
|
| 107 |
+
url = "https://huggingface.co/datasets/FactoryBench/FactoryBench/resolve/main/knowledge_graph/knowledge_graph.json"
|
| 108 |
+
kg = json.loads(urllib.request.urlopen(url).read())
|
| 109 |
+
|
| 110 |
+
# Machine spec lookup
|
| 111 |
+
machines_by_id = {m["machine_id"]: m for m in kg["machines"]}
|
| 112 |
+
|
| 113 |
+
# Error → operator protocol (the ground truth for L4 troubleshooting answers)
|
| 114 |
+
protocol_for = {e["root_cause"]: e["ur3_protocol"] for e in kg["root_cause_error_mapping"]}
|
| 115 |
+
print(protocol_for["collision_rigid_object"])
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
## Q&A pair counts
|
| 119 |
+
|
| 120 |
+
| Level | Full pool | Lite |
|
| 121 |
+
|-------|-----------|-------|
|
| 122 |
+
| L1 | 15,321 | 572 |
|
| 123 |
+
| L2 | 40,226 | 1,430 |
|
| 124 |
+
| L3 | 2,939 | 712 |
|
| 125 |
+
| L4 | 11,205 | 286 |
|
| 126 |
+
| **Total** | **69,691** | **3,000** |
|
| 127 |
+
|
| 128 |
+
The public release is a single undivided pool per level. The `train` split name
|
| 129 |
+
in the config block is the Hugging Face default for a single-file config, not a
|
| 130 |
+
semantic split. A private 15% slice is held back for contamination checks and is
|
| 131 |
+
not counted here.
|
| 132 |
+
|
| 133 |
+
## Q&A fields
|
| 134 |
+
|
| 135 |
+
Each line in `factorybench_qa/level_*.jsonl` (and `factorybench_lite/level_*.jsonl`) is a single Q&A item:
|
| 136 |
+
|
| 137 |
+
| Field | Description |
|
| 138 |
+
|-------|-------------|
|
| 139 |
+
| `id` | Unique item identifier |
|
| 140 |
+
| `level` | Causal level (1–4) |
|
| 141 |
+
| `template_id` | Question template the item was generated from |
|
| 142 |
+
| `template_type` | Answer format (`single_choice`, `multi_choice`, `ranking`, `tensor`, `free_form`) |
|
| 143 |
+
| `hides` | Channels/fields hidden from the model in this item |
|
| 144 |
+
| `question` | Natural-language question |
|
| 145 |
+
| `options` | Answer options (for MCQ/ranking templates) |
|
| 146 |
+
| `answer` | Ground-truth answer |
|
| 147 |
+
| `root_cause` | Underlying fault/cause (Level 4 only) |
|
| 148 |
+
| `acceptance_bounds` | Tolerance for numerical answers |
|
| 149 |
+
| `provenance` | Source episode(s) and channels used to derive the item |
|
| 150 |
+
| `context` | Time-series and metadata context exposed to the model |
|
| 151 |
+
|
| 152 |
+
## Loading the data
|
| 153 |
+
|
| 154 |
+
```python
|
| 155 |
+
from datasets import load_dataset
|
| 156 |
+
|
| 157 |
+
# Load one level of the full pool
|
| 158 |
+
ds = load_dataset("FactoryBench/FactoryBench", "level_1", split="train")
|
| 159 |
+
|
| 160 |
+
# Load one level of the balanced Lite subset
|
| 161 |
+
lite = load_dataset("FactoryBench/FactoryBench", "lite_level_1", split="train")
|
| 162 |
+
|
| 163 |
+
# Or address a file directly
|
| 164 |
+
ds = load_dataset(
|
| 165 |
+
"FactoryBench/FactoryBench",
|
| 166 |
+
data_files="factorybench_qa/level_1.jsonl",
|
| 167 |
+
split="train",
|
| 168 |
+
)
|
| 169 |
+
|
| 170 |
+
# Load underlying telemetry
|
| 171 |
+
import pandas as pd
|
| 172 |
+
root = "hf://datasets/FactoryBench/FactoryBench/factorywave"
|
| 173 |
+
episodes = pd.read_parquet(f"{root}/episodes.parquet")
|
| 174 |
+
ur_125 = pd.read_parquet(f"{root}/ur_signals.parquet")
|
| 175 |
+
ur_10 = pd.read_parquet(f"{root}/ur_signals_10hz.parquet") # different episodes
|
| 176 |
+
kuka = pd.read_parquet(f"{root}/kuka_signals.parquet")
|
| 177 |
+
screw = pd.read_parquet(f"{root}/ur_screwdriver_signals.parquet")
|
| 178 |
+
|
| 179 |
+
# Load the combined knowledge graph (machines, faults, error→protocol, ...)
|
| 180 |
+
import json, urllib.request
|
| 181 |
+
kg = json.loads(urllib.request.urlopen(
|
| 182 |
+
"https://huggingface.co/datasets/FactoryBench/FactoryBench/resolve/main/knowledge_graph/knowledge_graph.json"
|
| 183 |
+
).read())
|
| 184 |
+
```
|
| 185 |
+
|
| 186 |
+
## Citation
|
| 187 |
+
|
| 188 |
+
If you use FactoryBench, please cite the dataset and the two upstream open-source datasets it incorporates (AURSAD and voraus-AD):
|
| 189 |
+
|
| 190 |
+
```bibtex
|
| 191 |
+
@misc{anonymous2026factorybench,
|
| 192 |
+
title = {FactoryBench: Evaluating Industrial Machine Understanding},
|
| 193 |
+
author = {Anonymous},
|
| 194 |
+
year = {2026},
|
| 195 |
+
note = {Submission under double-blind review}
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
@article{leporowski2022aursad,
|
| 199 |
+
title = {{AURSAD}: Universal Robot Screwdriving Anomaly Detection Dataset},
|
| 200 |
+
author = {Leporowski, B{\l}a{\.z}ej and Tola, Daniella and Hansen, Christian and Iosifidis, Alexandros},
|
| 201 |
+
journal = {arXiv preprint arXiv:2202.03211},
|
| 202 |
+
year = {2022}
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
@misc{brockmann2024vorausad,
|
| 206 |
+
title = {voraus-{AD}: A New Dataset for Anomaly Detection in Robot Applications},
|
| 207 |
+
author = {Brockmann, Jan Thie{\ss} and Rudolph, Marco and Rosenhahn, Bodo and Wandt, Bastian},
|
| 208 |
+
year = {2024},
|
| 209 |
+
eprint = {2311.04153},
|
| 210 |
+
archivePrefix = {arXiv},
|
| 211 |
+
primaryClass = {cs.RO}
|
| 212 |
+
}
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
## Intended use & limitations
|
| 216 |
+
|
| 217 |
+
**Intended use.** Benchmark evaluation of LLMs and time-series models on structured industrial Q&A reasoning tasks (state, intervention, counterfactual, decision-making).
|
| 218 |
+
|
| 219 |
+
**Limitations.** Domain-specific to factory and industrial robotic scenarios; may not generalise to open-domain Q&A. Faults are atomic and drawn from a closed catalogue of 27 physically injected mechanisms — different from compound or gradual real-world faults. The dataset shows a size imbalance between Levels 2 and 3.
|
| 220 |
+
|
| 221 |
+
**Out-of-scope.** Not intended for deployment in safety-critical, medical, legal, or financial decision systems without further validation by domain experts.
|
| 222 |
+
|
| 223 |
+
## License
|
| 224 |
+
|
| 225 |
+
Released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. You may share and adapt the dataset for any purpose, including commercial, with appropriate attribution to the FactoryBench authors. The accompanying generator source code, evaluation scripts, LLM-as-judge prompts, and tooling (linked from the paper) are released separately under the MIT License.
|
factorybench_lite/level_1.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
factorybench_lite/level_2.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ef0ec3817a15df7b2a9927f046b3b01c8ed3935f653ee2eb98f0bebc70a4279
|
| 3 |
+
size 29363133
|
factorybench_lite/level_3.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe357ea54f46aaaaa1045877ac688b2437440eba80bc30404a819b079a0e530e
|
| 3 |
+
size 20657794
|
factorybench_lite/level_4.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67b67a17934dafdaf31169c99806ed912d7e01ea6d2de82e376ebb1b9f4ad724
|
| 3 |
+
size 11346278
|
factorybench_qa/level_1.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62a9fbacaf8f2ef82cc68145ca2c6b86a49327deb8f6d8fcd6c81efccee98c62
|
| 3 |
+
size 223181135
|
factorybench_qa/level_2.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b7e701d46b70bbc8104d7439b2a96758d8b40c35310db41137962fe7f4c29f0
|
| 3 |
+
size 781123077
|
factorybench_qa/level_3.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7705c2bc697b7b4c49a66648e44bb27dc127e89c1f7f808899c2ece53a8876c8
|
| 3 |
+
size 88425267
|
factorybench_qa/level_4.jsonl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8eda3a9e7ca3b6ef8670aae79a39fff86fa1b71b8ddea273009a4aed65e0be7
|
| 3 |
+
size 682822132
|
factorywave/episodes.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2faacd23e06a8f04ad5f6a86a0a4a46ed0afa97acf84523334e969852c3d5e5
|
| 3 |
+
size 590237
|
factorywave/flow.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:75ded683a0290f13f3d487ec4e2a6d71ba87429882af43f223bd6e5fd824d9f5
|
| 3 |
+
size 39287
|
factorywave/kuka_signals.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d370fe91145462efde857e0a4eefa7dff516e52d104b413771111f038a13066
|
| 3 |
+
size 424166979
|
factorywave/ur_screwdriver_signals.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9938924ac8c3961a4782531bb15de80c1d31c1b87bce7c746986b6d0585d5544
|
| 3 |
+
size 1027042166
|
factorywave/ur_signals.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:413e20e296a293e9d31c7c77e309a1b92459eb7ed3ec071381be25f35aa07ccd
|
| 3 |
+
size 1704885150
|
factorywave/ur_signals_10hz.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d8ed6ad69a2230c50ad88c19f06d81595e67db8ef2ed16030dbc19b6669da4a
|
| 3 |
+
size 220910648
|
knowledge_graph/SCHEMA.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FactoryBench Knowledge Graph — Schema
|
| 2 |
+
|
| 3 |
+
`knowledge_graph.json` bundles the structured "world model" that grounds FactoryBench Q&A items: machine and gripper capabilities, the task/event vocabulary, the fault catalogue, and the operator-facing remediation protocols. The prompt builders and answer-derivation code consult these tables to (a) inject relevant context into prompts and (b) generate ground-truth answers for L4 troubleshooting items.
|
| 4 |
+
|
| 5 |
+
The file is a single JSON object with a top-level `$schema_version` and a `description`, plus the ten sections below. Every section value is either a `list` of records or a `dict`.
|
| 6 |
+
|
| 7 |
+
## machines (list)
|
| 8 |
+
|
| 9 |
+
Robot arms used as test platforms. One entry per physical machine class.
|
| 10 |
+
|
| 11 |
+
| Field | Type | Notes |
|
| 12 |
+
|-------|------|-------|
|
| 13 |
+
| `machine_id` | int | Stable id referenced by `datasets[*].machine_id`. |
|
| 14 |
+
| `machine_model` | str | Vendor model code (e.g. `"UR3e"`). |
|
| 15 |
+
| `manufacturer`, `series` | str | Vendor metadata. |
|
| 16 |
+
| `machine_type` | str | E.g. `"collaborative robot"`. |
|
| 17 |
+
| `weight_kg`, `payload_kg`, `degrees_of_freedom` | num | Physical specs. |
|
| 18 |
+
| `joint_rotation` | list[num] | Per-joint rotation limits. |
|
| 19 |
+
| `typical_applications` | list[str] | Free-text capability tags. |
|
| 20 |
+
| `control_interfaces` | list[str] | E.g. `["UrScript", "PolyScope"]`. |
|
| 21 |
+
| `joint_speed_limits`, `rated_current_per_joint` | list[num] | Per-joint maxima. |
|
| 22 |
+
| `safety_modes`, `joint_modes`, `robot_modes`, `runtime_states` | list[obj] | Enum tables (id ↔ human-readable label). |
|
| 23 |
+
| `used_in_paper_for` | list[str] | Datasets/tasks this machine appears in. |
|
| 24 |
+
|
| 25 |
+
## grippers (list)
|
| 26 |
+
|
| 27 |
+
End-effectors. One entry per gripper class.
|
| 28 |
+
|
| 29 |
+
| Field | Type | Notes |
|
| 30 |
+
|-------|------|-------|
|
| 31 |
+
| `gripper_id` | int | Stable id referenced by `datasets[*].gripper_id`. |
|
| 32 |
+
| `gripper_model`, `manufacturer`, `gripper_type`, `actuation` | str | Vendor metadata. |
|
| 33 |
+
| `finger_count`, `weight_kg`, `payload_kg`, `payload_kg_form_fit` | num | Physical specs. |
|
| 34 |
+
| `grip_force_range_N`, `torque_range_Nm`, `max_stroke_mm`, `opening_range_mm` | obj/list | Force/motion ranges. |
|
| 35 |
+
|
| 36 |
+
## datasets (list)
|
| 37 |
+
|
| 38 |
+
The four episode collections that make up FactoryWave. One entry per (machine, gripper, task) combination.
|
| 39 |
+
|
| 40 |
+
| Field | Type | Notes |
|
| 41 |
+
|-------|------|-------|
|
| 42 |
+
| `dataset_id` | str | E.g. `"factorywave"`, `"aursad"`, `"vorausad"`. |
|
| 43 |
+
| `name`, `description` | str | Human-facing label. |
|
| 44 |
+
| `machine_id`, `gripper_id` | int | FK into `machines` / `grippers`. |
|
| 45 |
+
| `task_id` | int | FK into `tasks`. |
|
| 46 |
+
| `source` | str | URL or citation. |
|
| 47 |
+
| `license` | str | |
|
| 48 |
+
|
| 49 |
+
## tasks (list)
|
| 50 |
+
|
| 51 |
+
Task-level vocabulary: each task is a sequence of named phases the robot moves through.
|
| 52 |
+
|
| 53 |
+
| Field | Type | Notes |
|
| 54 |
+
|-------|------|-------|
|
| 55 |
+
| `id` | int | Stable id referenced by `datasets[*].task_id` and used in `relevance_specs`. |
|
| 56 |
+
| `name`, `description` | str | E.g. `"pick_and_place"`. |
|
| 57 |
+
| `phases` | list[obj] | Ordered phase descriptors (id, name, intent). Used by phase-gated relevance sampling. |
|
| 58 |
+
|
| 59 |
+
## events (list)
|
| 60 |
+
|
| 61 |
+
Atomic events that can occur during a task (e.g. collision triggers, gripper transitions, screwdriver phase changes).
|
| 62 |
+
|
| 63 |
+
| Field | Type | Notes |
|
| 64 |
+
|-------|------|-------|
|
| 65 |
+
| `id` | int | Stable event id encoded in episode rows under `event`. |
|
| 66 |
+
| `name`, `description` | str | |
|
| 67 |
+
| `tasks` | list[int] | Tasks where this event can occur. |
|
| 68 |
+
| `variables` | list[obj] | Per-event observable variables and their ranges. |
|
| 69 |
+
|
| 70 |
+
## root_causes (list)
|
| 71 |
+
|
| 72 |
+
Catalogue of injectable fault mechanisms. The "physics" side of a fault.
|
| 73 |
+
|
| 74 |
+
| Field | Type | Notes |
|
| 75 |
+
|-------|------|-------|
|
| 76 |
+
| `fault_id` | int | Stable id used in episode-level `fault_label`. Also the FK from `root_cause_error_mapping`. |
|
| 77 |
+
| `task` | str | Which task this fault applies to. |
|
| 78 |
+
| `root_cause` | str | Snake-case identifier (e.g. `"collision_rigid_object"`). FK from `root_cause_error_mapping[*].root_cause`. |
|
| 79 |
+
| `description` | str | Plain-language explanation. |
|
| 80 |
+
| `severity_levels` | list[obj] | Mild / moderate / severe variants and their parameters. |
|
| 81 |
+
| `injectable` | bool | Whether the fault was actively injected (vs. passively observed). |
|
| 82 |
+
| `possible_anomalies` | list[str] | FK into `anomalies[*].anomaly_name`. |
|
| 83 |
+
| `simulation_procedure` | str | How to reproduce the fault. |
|
| 84 |
+
| `datasets` | list[str] | FK into `datasets[*].dataset_id`. |
|
| 85 |
+
|
| 86 |
+
## anomalies (list)
|
| 87 |
+
|
| 88 |
+
Catalogue of *observable* symptoms (the "phenomenology" side of a fault).
|
| 89 |
+
|
| 90 |
+
| Field | Type | Notes |
|
| 91 |
+
|-------|------|-------|
|
| 92 |
+
| `anomaly_name` | str | Snake-case identifier (e.g. `"sudden_torque_spike"`). |
|
| 93 |
+
| `description` | str | What the anomaly looks like in the data. |
|
| 94 |
+
| `relevant_features_from_schema` | list[str] | Which channels (`feedback_speed_*`, `effort_target_torque_*`, etc.) the anomaly manifests on. |
|
| 95 |
+
|
| 96 |
+
A single fault can manifest as multiple anomalies, and a single anomaly can be caused by multiple faults — the join is via `root_causes[*].possible_anomalies`.
|
| 97 |
+
|
| 98 |
+
## root_cause_error_mapping (list)
|
| 99 |
+
|
| 100 |
+
The error-to-protocol table. Maps each `fault_id` / `root_cause` to the UR3 controller error it raises (when any) and the operator-facing remediation protocol.
|
| 101 |
+
|
| 102 |
+
| Field | Type | Notes |
|
| 103 |
+
|-------|------|-------|
|
| 104 |
+
| `fault_id` | int | FK into `root_causes`. |
|
| 105 |
+
| `root_cause` | str | Mirror of `root_causes[*].root_cause` (denormalised for direct lookup). |
|
| 106 |
+
| `ur3_error_code` | str / null | UR3 controller error code (e.g. `"C 39 A 1"`), `null` for software-only faults. |
|
| 107 |
+
| `ur3_error_name` | str / null | Human-readable error name as shown on the teach pendant. |
|
| 108 |
+
| `ur3_description` | str / null | What the controller reports to the operator. |
|
| 109 |
+
| `ur3_protocol` | str | Step-by-step remediation procedure. **This is the ground-truth answer for L4 troubleshooting items.** |
|
| 110 |
+
|
| 111 |
+
## anomaly_ranking (dict)
|
| 112 |
+
|
| 113 |
+
Severity ordering of anomalies, used by the rubric scorer.
|
| 114 |
+
|
| 115 |
+
| Field | Type | Notes |
|
| 116 |
+
|-------|------|-------|
|
| 117 |
+
| `ranking_least_to_most_severe` | list[str] | Anomaly names in ascending severity. |
|
| 118 |
+
|
| 119 |
+
## relevance_specs (dict)
|
| 120 |
+
|
| 121 |
+
Drives fault-aware sub-series sampling — i.e. picking a window where the fault's signature is observable rather than uniformly random. See `src/question_generation/utils/relevance.py`.
|
| 122 |
+
|
| 123 |
+
| Field | Type | Notes |
|
| 124 |
+
|-------|------|-------|
|
| 125 |
+
| `version` | str | Spec version. |
|
| 126 |
+
| `description` | str | Human-facing summary. |
|
| 127 |
+
| `locality_definitions` | dict | The four sampling localities: `global` (uniform), `event` (window must contain transient), `phase_gated` (window must overlap target task phase), `cumulative` (length-based with optional phase gate). |
|
| 128 |
+
| `defaults` | dict | Per-locality default parameters merged into each spec. |
|
| 129 |
+
| `specs` | dict | Per-`fault_id` overrides. Keys are stringified fault ids; values declare locality, target phases, min window length, etc. |
|
| 130 |
+
|
| 131 |
+
Set `FB_RELEVANCE=0` in the environment to bypass and fall back to uniform sampling.
|
| 132 |
+
|
| 133 |
+
## Loading
|
| 134 |
+
|
| 135 |
+
```python
|
| 136 |
+
import json, urllib.request
|
| 137 |
+
|
| 138 |
+
URL = "https://huggingface.co/datasets/FactoryBench/FactoryBench/resolve/main/knowledge_graph/knowledge_graph.json"
|
| 139 |
+
kg = json.loads(urllib.request.urlopen(URL).read())
|
| 140 |
+
|
| 141 |
+
# Machine spec lookup by id
|
| 142 |
+
machines_by_id = {m["machine_id"]: m for m in kg["machines"]}
|
| 143 |
+
|
| 144 |
+
# Error→protocol lookup
|
| 145 |
+
protocol_for = {e["root_cause"]: e["ur3_protocol"] for e in kg["root_cause_error_mapping"]}
|
| 146 |
+
print(protocol_for["collision_rigid_object"])
|
| 147 |
+
```
|
knowledge_graph/knowledge_graph.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|