Datasets:
Update dataset card with v2 schema and Tarantula insights
Browse files
README.md
CHANGED
|
@@ -25,21 +25,54 @@ Python→Rust transpilation pairs for Compiler-in-the-Loop training.
|
|
| 25 |
|
| 26 |
| Split | Examples | With Rust | Size |
|
| 27 |
|-------|----------|-----------|------|
|
| 28 |
-
| train | 606 |
|
| 29 |
|
| 30 |
## Schema
|
| 31 |
|
| 32 |
```
|
| 33 |
-
- example_name: str
|
| 34 |
-
- python_file: str
|
| 35 |
-
- python_code: str
|
| 36 |
-
- rust_code: str
|
| 37 |
-
- has_rust: bool
|
| 38 |
-
- category: str
|
| 39 |
-
- python_lines: int
|
| 40 |
-
- rust_lines: int
|
|
|
|
|
|
|
|
|
|
| 41 |
```
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
## Usage
|
| 44 |
|
| 45 |
```python
|
|
|
|
| 25 |
|
| 26 |
| Split | Examples | With Rust | Size |
|
| 27 |
|-------|----------|-----------|------|
|
| 28 |
+
| train | 606 | 439 (72.4%) | 957 KB |
|
| 29 |
|
| 30 |
## Schema
|
| 31 |
|
| 32 |
```
|
| 33 |
+
- example_name: str # Directory name (e.g., "example_fibonacci")
|
| 34 |
+
- python_file: str # Python filename
|
| 35 |
+
- python_code: str # Full Python source
|
| 36 |
+
- rust_code: str # Corresponding Rust (empty if not transpiled)
|
| 37 |
+
- has_rust: bool # Whether Rust translation exists
|
| 38 |
+
- category: str # Extracted category
|
| 39 |
+
- python_lines: int # Line count
|
| 40 |
+
- rust_lines: int # Line count
|
| 41 |
+
- blocking_features: [str] # Detected Python features (v2)
|
| 42 |
+
- suspiciousness: float # Tarantula score 0-1 (v2)
|
| 43 |
+
- error: str # Transpilation error if failed (v2)
|
| 44 |
```
|
| 45 |
|
| 46 |
+
## Tarantula Fault Localization
|
| 47 |
+
|
| 48 |
+
The `corpus_insights.json` file contains fault localization analysis using the Tarantula algorithm from [entrenar](https://github.com/paiml/entrenar) CITL.
|
| 49 |
+
|
| 50 |
+
### Priority Features (by suspiciousness score)
|
| 51 |
+
|
| 52 |
+
| Feature | Score | Categories Affected | Priority |
|
| 53 |
+
|---------|-------|---------------------|----------|
|
| 54 |
+
| async_await | 0.946 | 4 | P0 |
|
| 55 |
+
| generator | 0.927 | 14 | P0 |
|
| 56 |
+
| walrus_operator | 0.850 | 1 | P1 |
|
| 57 |
+
| lambda | 0.783 | 29 | P1 |
|
| 58 |
+
| context_manager | 0.652 | 93 | P2 |
|
| 59 |
+
|
| 60 |
+
Higher suspiciousness = more correlated with transpilation failures.
|
| 61 |
+
|
| 62 |
+
### Insights File Structure
|
| 63 |
+
|
| 64 |
+
```json
|
| 65 |
+
{
|
| 66 |
+
"summary": { "total_pairs": 606, "success_rate": 71.9 },
|
| 67 |
+
"tarantula_fault_localization": { "scores": {...} },
|
| 68 |
+
"priority_features_to_implement": [...],
|
| 69 |
+
"zero_success_categories": [...],
|
| 70 |
+
"category_insights": {...}
|
| 71 |
+
}
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
Regenerate with: `python3 scripts/generate_insights.py`
|
| 75 |
+
|
| 76 |
## Usage
|
| 77 |
|
| 78 |
```python
|