Datasets:
Update Dataset Card for spec-verify
Browse files
README.md
CHANGED
|
@@ -1,32 +1,66 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
dtype: string
|
| 16 |
-
splits:
|
| 17 |
-
- name: train
|
| 18 |
-
num_bytes: 35613638
|
| 19 |
-
num_examples: 18597
|
| 20 |
-
- name: test
|
| 21 |
-
num_bytes: 3958347
|
| 22 |
-
num_examples: 2067
|
| 23 |
-
download_size: 18097126
|
| 24 |
-
dataset_size: 39571985
|
| 25 |
-
configs:
|
| 26 |
-
- config_name: default
|
| 27 |
-
data_files:
|
| 28 |
-
- split: train
|
| 29 |
-
path: data/train-*
|
| 30 |
-
- split: test
|
| 31 |
-
path: data/test-*
|
| 32 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pretty_name: spec-verify v2 (English, quality-filtered spec + code)
|
| 6 |
+
tags:
|
| 7 |
+
- software-engineering
|
| 8 |
+
- specification
|
| 9 |
+
- code
|
| 10 |
+
- github
|
| 11 |
+
- english
|
| 12 |
+
- quality-filtered
|
| 13 |
+
size_categories:
|
| 14 |
+
- 10K<n<100K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# spec-verify dataset **v2**
|
| 18 |
+
|
| 19 |
+
## Description
|
| 20 |
+
|
| 21 |
+
This is the **v2** dataset on the Hugging Face Hub (`spec-verify-dataset-v2`), built for **10,000+** high-quality **(specification, code)** pairs.
|
| 22 |
+
|
| 23 |
+
- **Quality filtered**: non-English and low-signal rows are removed using heuristics (ASCII/Latin ratio, repetition, minimum word counts, valid docstring shape for Python rows).
|
| 24 |
+
- **English-oriented**: specifications are cleaned to **ASCII/Latin**-heavy text; issue/PR and docstring rows must pass English dominance checks.
|
| 25 |
+
- **Real code for docstring rows**: the `docstring` subset requires **substantial Python implementation** (not signature-only), including logic keywords and length checks.
|
| 26 |
+
- **GitHub issues / PRs**: natural-language specifications only (`code` may be empty); filtered for English and non-repetitive text.
|
| 27 |
+
|
| 28 |
+
Pairs are mined from public GitHub repositories. Intended for **spec-to-code**, **code-to-spec**, and **verification** research.
|
| 29 |
+
|
| 30 |
+
## Data fields
|
| 31 |
+
|
| 32 |
+
| Column | Meaning |
|
| 33 |
+
|--------|---------|
|
| 34 |
+
| `id` | Stable hash identifier for the row |
|
| 35 |
+
| `source` | `github_issue` (includes PR descriptions in this schema) or `docstring` |
|
| 36 |
+
| `repo` | Source repository in `owner/name` form |
|
| 37 |
+
| `specification` | English-cleaned NL spec (issue/PR text, or signature + docstring + optional structured notes from extraction) |
|
| 38 |
+
| `code` | Full function implementation for `docstring` rows; often empty for `github_issue` |
|
| 39 |
+
| `url` | Link to the issue, pull request, or file on GitHub |
|
| 40 |
+
|
| 41 |
+
## Example record
|
| 42 |
+
|
| 43 |
+
```json
|
| 44 |
+
{
|
| 45 |
+
"id": "d3b066c9609ab8e6",
|
| 46 |
+
"source": "github_issue",
|
| 47 |
+
"repo": "aio-libs/aiohttp",
|
| 48 |
+
"specification": "GunicornWebWorker fails to reset SIGCHLD causing spurious \"Worker exited\" errors\n\n### Describe the bug\n\nThe `aiohttp.worker.GunicornWebWorker` class overrides `init_signals()` but fails to reset SIGCHLD to SIG_DFL. This causes workers to inherit the gunicorn master arbiter's SIGCHLD handler, leading to spurious error logs when application code spawns subprocesses.\n\n## Evidence\n\n### 1. aiohttp/worker.py has incomplete fix\nLines 191-192 contain a comment about resetting signals, but NO implementation:\n\n```python\n# Reset signals so Gunicorn doesn't swallow subprocess return codes\n# See: https://github.com/aio-libs/aiohttp/issues/6130\n# CODE IS MISSING HERE!\n```\n\n### 2. Base Worker resets SIGCHLD correctly\n`gunicorn/workers/base.py` properly resets SIGCHLD:\n\n```python\nSIGNALS = [\"ABRT\", \"HUP\", \"QUIT\", \"INT\", \"TERM\", \"USR1\", \"USR2\", \"WINCH\", \"CHLD\"]\n\ndef init_signals(self):\n # reset signaling\n for s in self.SIGNALS:\n signal.signal(s, signal.SIG_DFL) # Resets SIGCHLD\n```\n\n### 3. aiohttp Worker doesn't call super()\n`aiohttp/worker.py:160-193` overrides `init_signals()` but never calls `super().init_signals()`, so SIGCHLD is never reset.\n\n### To Reproduce\n\n1.Install gunicorn and aiohttp latest versions\n2.Run this code from below, see usage inside\n```\n#!/usr/bin/env python3\n\"\"\"\nReproduction of aiohttp GunicornWebWorker SIGCHLD inheritance bug.\n\nUsage:\n python aiohttp_sigchld_bug.py # Show the bug\n python aiohttp_sigchld_bug.py --fixed # Show with fix\n\nBug: Workers inherit master's SIGCHLD handler, logging spurious errors\nabout subprocess PIDs as if they were worker PIDs.\n\nExpected: Clean worker startup\nActual (without fix): ERROR logs like \"Worker (pid:X) exited with code 1\"\nwhere X never appears in \"Booting worker\" logs.\n\"\"\"\nimport sys\n\n# Run with gunicorn when executed directly\nif __name__ == \"__main__\":\n import os\n import subprocess\n import tempfile\n\n apply_fix = \"--fixed\" in sys.argv\n\n # Create a separate module that spawns subprocesses during import\n submodule_content = \"\"\"\nimport subprocess\nimport time\n\n# Spawn subprocesses during module import to trigger SIGCHLD\n# This simulates real-world code that checks versions, calls git, dpkg, etc.\nprocesses = []\nfor i in range(5):\n # Spawn subprocess that exits with code 1\n p = subprocess.Popen(['false'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n processes.append(p)\n\n# Small delay creates window where:\n# 1. Subprocesses exit and become zombies\n# 2. SIGCHLD is delivered to worker\n# 3. If worker has inherited arbiter's handler, it reaps OTHER workers' zombies\ntime.sleep(0.05)\n\n# Clean up our zombies\nfor p in processes:\n p.wait()\n\"\"\"\n\n # Create the main app module\n app_content = \"\"\"\n# Import submodule that spawns subprocesses (triggers bug)\nimport subprocess_module\n\nfrom aiohttp import web\n\nasync def hello(request):\n return web.Response(text=\"Hello World\\\\n\")\n\nasync def application():\n app = web.Application()\n app.router.add_get(\"/\", hello)\n return app\n\"\"\"\n\n # Create config with optional fix\n config_content = \"\"\"\nworkers = 4\nworker_class = \"aiohttp.worker.GunicornWebWorker\"\nbind = \"127.0.0.1:8765\"\nloglevel = \"info\"\n\"\"\"\n\n if appl
|
| 49 |
+
… (truncated for card)
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Intended use
|
| 53 |
+
|
| 54 |
+
- Training and evaluating models that **generate formal or behavioral specs from natural language**
|
| 55 |
+
- **Spec-to-code** or **code-to-spec** alignment with **implementation-heavy** Python for docstring-sourced rows
|
| 56 |
+
- **Test / verification** research conditioned on specifications
|
| 57 |
+
|
| 58 |
+
## Limitations
|
| 59 |
+
|
| 60 |
+
- Sources are public GitHub data; quality and licensing follow upstream repositories.
|
| 61 |
+
- Heuristic filters favor English and Latin script; they do not guarantee semantic correctness.
|
| 62 |
+
- Older **v1** uploads may use a different schema; this repo is **v2** (`spec-verify-dataset-v2`).
|
| 63 |
+
|
| 64 |
+
## Citation
|
| 65 |
+
|
| 66 |
+
If you use this dataset, cite the upstream repositories and acknowledge the spec-verify extraction pipeline.
|