Update README.md
Browse files
README.md
CHANGED
|
@@ -23,18 +23,9 @@ language:
|
|
| 23 |
license: other
|
| 24 |
configs:
|
| 25 |
- config_name: default
|
| 26 |
-
data_files: "
|
| 27 |
-
# Note: Files have variable schemas due to different language sets per repository
|
| 28 |
-
- config_name: enhanced_triple
|
| 29 |
-
data_files: "data/enhanced_enhanced_enhanced_*.jsonl"
|
| 30 |
-
- config_name: enhanced_double
|
| 31 |
-
data_files: "data/enhanced_enhanced_sustained_*.jsonl"
|
| 32 |
-
- config_name: enhanced_single
|
| 33 |
-
data_files: "data/enhanced_sustained_*.jsonl"
|
| 34 |
---
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
# CodeReality: Evaluation Subset - Deliberately Noisy Code Dataset
|
| 39 |
|
| 40 |

|
|
@@ -84,10 +75,49 @@ codereality-1t/
|
|
| 84 |
|
| 85 |
### Loading the Dataset
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
```python
|
| 88 |
-
import
|
| 89 |
-
|
|
|
|
|
|
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
# Load evaluation subset metadata
|
| 92 |
with open('eval_metadata.json', 'r') as f:
|
| 93 |
metadata = json.load(f)
|
|
|
|
| 23 |
license: other
|
| 24 |
configs:
|
| 25 |
- config_name: default
|
| 26 |
+
data_files: "data_csv/*.csv"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
---
|
| 28 |
|
|
|
|
|
|
|
| 29 |
# CodeReality: Evaluation Subset - Deliberately Noisy Code Dataset
|
| 30 |
|
| 31 |

|
|
|
|
| 75 |
|
| 76 |
### Loading the Dataset
|
| 77 |
|
| 78 |
+
## 📊 **Unified CSV Format**
|
| 79 |
+
|
| 80 |
+
**This dataset has been converted to CSV format with a unified schema** to ensure compatibility with Hugging Face's dataset viewer and eliminate schema inconsistencies that were present in the original JSONL format.
|
| 81 |
+
|
| 82 |
+
### **How to Use This Dataset**
|
| 83 |
+
|
| 84 |
+
**Option 1: Standard Hugging Face Datasets (Recommended)**
|
| 85 |
```python
|
| 86 |
+
from datasets import load_dataset
|
| 87 |
+
|
| 88 |
+
# Load the complete dataset
|
| 89 |
+
dataset = load_dataset("vinsblack/CodeReality")
|
| 90 |
|
| 91 |
+
# Access the data
|
| 92 |
+
print(f"Total samples: {len(dataset['train'])}")
|
| 93 |
+
print(f"Columns: {dataset['train'].column_names}")
|
| 94 |
+
|
| 95 |
+
# Sample record
|
| 96 |
+
sample = dataset['train'][0]
|
| 97 |
+
print(f"Repository: {sample['repo_name']}")
|
| 98 |
+
print(f"Language: {sample['primary_language']}")
|
| 99 |
+
print(f"Quality Score: {sample['quality_score']}")
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
**Option 2: Direct CSV Access**
|
| 103 |
+
```python
|
| 104 |
+
import pandas as pd
|
| 105 |
+
from huggingface_hub import snapshot_download
|
| 106 |
+
|
| 107 |
+
# Download the dataset
|
| 108 |
+
repo_path = snapshot_download(repo_id="vinsblack/CodeReality", repo_type="dataset")
|
| 109 |
+
|
| 110 |
+
# Load CSV files
|
| 111 |
+
import glob
|
| 112 |
+
csv_files = glob.glob(f"{repo_path}/data_csv/*.csv")
|
| 113 |
+
df = pd.concat([pd.read_csv(f) for f in csv_files], ignore_index=True)
|
| 114 |
+
|
| 115 |
+
print(f"Total records: {len(df)}")
|
| 116 |
+
print(f"Columns: {list(df.columns)}")
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
**Option 3: Metadata and Analysis**
|
| 120 |
+
```python
|
| 121 |
# Load evaluation subset metadata
|
| 122 |
with open('eval_metadata.json', 'r') as f:
|
| 123 |
metadata = json.load(f)
|