Views
No views yet
| File | Description |
|---|---|
pipeline.py | Main production script — ran as an hf_jobs CPU job. Does everything: loading, filtering, converting, sampling, pushing. |
extract_tb2_instructions.py | Standalone script to extract 89 task instructions from Terminal-Bench 2.0 for decontamination. |
test_pipeline.py | Development/test scripts for inspecting dataset format, validating conversion logic, and debugging edge cases. |
1# Submitted via hf_jobs API:
2# Hardware: cpu-upgrade (8 vCPU, 32GB RAM)
3# Timeout: 3 hours
4# Dependencies: datasets, huggingface_hub, pyarrow
5# Total runtime: ~42 minutes1pip install datasets huggingface_hub pyarrow
2python pipeline.pyharborframework/terminal-bench-2.0too_short: <3 messages in conversationmalformed_json: >50% of assistant turns have invalid Terminus-2 JSONchinese_chars: Chinese characters in assistant contentidentity_leak: Mentions DeepSeek model name or hosted_vllm providertb2_contaminated: 14-gram word overlap with any Terminal-Bench 2.0 instructiontoo_long: >110,000 characters (≈ >32K Hunyuan-4B tokens at 3.5 chars/token)INPUT (assistant turn):
<think>
[reasoning text]
</think>
{
"analysis": "Current state analysis...",
"plan": "Next steps plan...",
"commands": [
{"keystrokes": "ls -la\n", "duration": 0.1},
{"keystrokes": "cd project\n", "duration": 0.1}
],
"task_complete": false
}
OUTPUT (assistant turn):
<thinking>
[reasoning text]
</thinking>
<bash>
ls -la
cd project
</bash><think> block
Sometimes the model puts the JSON payload inside the <think> tags (model artifact). The extractor handles this by searching for {"analysis", {"plan", or {"commands" patterns throughout the entire content.<think> exists, the turn is salvaged as thinking-only (no <bash> block). Rejected only if >50% of assistant turns fail.| Domain | Weight | Difficulty | Weight |
|---|---|---|---|
| software_engineering | 2.0x | medium | 1.5x |
| debugging | 2.0x | easy | 1.0x |
| security | 1.8x | mixed | 0.8x |
| swe | 1.8x | na (adapters) | 1.2x |
| code | 1.5x | ||
| system_administration | 1.5x | ||
| data_science | 1.3x | ||
| scientific_computing | 1.3x | ||
| others | 1.0x |
conversations: List[Dict] with {role, content} — MicroAgent XML formattask: Task identifiersource_category: Domain (code, math, swe, debugging, etc.)difficulty: easy / medium / mixed / naconfig: Original config pathest_token_count: Estimated Hunyuan-4B token count (chars / 3.5)enable_thinking: Whether DeepSeek thinking mode was enabled| Stage | Count |
|---|---|
| Input | 366,154 |
| After filtering + conversion | 340,191 (92.9%) |
| After sampling | 50,000 |
| Filter | Removed |
|---|---|
| too_long | 22,200 |
| malformed_json | 2,571 |
| too_short | 1,190 |
| identity_leak | 1 |
| tb2_contaminated | 1 |
cpu-upgrade (32GB RAM) without OOM. Each parquet file is processed independently and freed after writing.