mike dupont
commited on
Commit
Β·
381036c
1
Parent(s):
fade2cf
Add comprehensive dataset card with YAML metadata
Browse files- Added HuggingFace dataset card frontmatter
- Task categories: text-retrieval, feature-extraction
- Tags: code, git, provenance, rust, file-index
- Size category: 1M-10M files
- Complete usage examples (Pandas, DuckDB, Polars)
- Dataset creation methodology
- Performance metrics and statistics
README.md
CHANGED
|
@@ -1,82 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# meta-introspector: Unified Code Analysis Dataset
|
| 2 |
|
| 3 |
**Organization**: [introspector](https://huggingface.co/introspector)
|
| 4 |
**Dataset**: [meta-introspector](https://huggingface.co/datasets/introspector/meta-introspector)
|
| 5 |
**License**: AGPL-3.0
|
| 6 |
|
| 7 |
-
## π―
|
| 8 |
|
| 9 |
-
The **meta-introspector** dataset
|
| 10 |
|
| 11 |
-
- **
|
| 12 |
-
- **
|
| 13 |
-
- **Repository
|
| 14 |
-
- **
|
| 15 |
|
| 16 |
## π Dataset Structure
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
```
|
| 19 |
-
meta-introspector/
|
| 20 |
-
βββ indexes/
|
| 21 |
-
βββ files.parquet # 3.66M files with git provenance (437MB)
|
| 22 |
-
```
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
```python
|
| 29 |
import pandas as pd
|
| 30 |
|
| 31 |
-
# Load
|
| 32 |
-
|
| 33 |
-
print(f"Loaded {len(files_df)} files")
|
| 34 |
|
| 35 |
-
# Find
|
| 36 |
-
rust_files =
|
| 37 |
print(f"Found {len(rust_files)} Rust files")
|
| 38 |
|
| 39 |
-
# Find
|
| 40 |
-
|
| 41 |
-
print(f"Found {len(
|
| 42 |
```
|
| 43 |
|
| 44 |
-
###
|
| 45 |
-
|
| 46 |
-
```
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
```
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
##
|
| 71 |
|
| 72 |
-
###
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
## π Related Datasets
|
| 82 |
|
|
@@ -87,6 +195,11 @@ AND tracked = false;
|
|
| 87 |
|
| 88 |
This dataset is automatically updated from the [meta-introspector](https://github.com/meta-introspector/meta-introspector) project.
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
## π Citation
|
| 91 |
|
| 92 |
```bibtex
|
|
@@ -95,10 +208,14 @@ This dataset is automatically updated from the [meta-introspector](https://githu
|
|
| 95 |
author={Meta-Introspector Team},
|
| 96 |
year={2026},
|
| 97 |
url={https://huggingface.co/datasets/introspector/meta-introspector},
|
| 98 |
-
note={3.66M+ files with git provenance}
|
| 99 |
}
|
| 100 |
```
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
---
|
| 103 |
|
| 104 |
**Generated**: 2026-01-17
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: agpl-3.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-retrieval
|
| 5 |
+
- feature-extraction
|
| 6 |
+
tags:
|
| 7 |
+
- code
|
| 8 |
+
- git
|
| 9 |
+
- provenance
|
| 10 |
+
- rust
|
| 11 |
+
- file-index
|
| 12 |
+
size_categories:
|
| 13 |
+
- 1M<n<10M
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
# meta-introspector: Unified Code Analysis Dataset
|
| 17 |
|
| 18 |
**Organization**: [introspector](https://huggingface.co/introspector)
|
| 19 |
**Dataset**: [meta-introspector](https://huggingface.co/datasets/introspector/meta-introspector)
|
| 20 |
**License**: AGPL-3.0
|
| 21 |
|
| 22 |
+
## π― Dataset Summary
|
| 23 |
|
| 24 |
+
The **meta-introspector** dataset provides a comprehensive index of 3.66 million files with full git provenance tracking. This dataset enables:
|
| 25 |
|
| 26 |
+
- **Code search** across millions of files
|
| 27 |
+
- **Provenance tracking** from files to git commits
|
| 28 |
+
- **Repository analysis** at scale
|
| 29 |
+
- **ML training** on real-world code data
|
| 30 |
|
| 31 |
## π Dataset Structure
|
| 32 |
|
| 33 |
+
### Data Instances
|
| 34 |
+
|
| 35 |
+
Each row in `indexes/files.parquet` represents a file with its git metadata:
|
| 36 |
+
|
| 37 |
+
```json
|
| 38 |
+
{
|
| 39 |
+
"file_path": "/mnt/data1/meta-introspector/src/main.rs",
|
| 40 |
+
"git_repo": "/mnt/data1/meta-introspector",
|
| 41 |
+
"commit": "7fc28d09...",
|
| 42 |
+
"branch": "novel-code-analysis-clean",
|
| 43 |
+
"remote": "git@github.com:meta-introspector/meta-introspector.git",
|
| 44 |
+
"url": "https://github.com/meta-introspector/meta-introspector/blob/novel-code-analysis-clean/src/main.rs",
|
| 45 |
+
"tracked": true
|
| 46 |
+
}
|
| 47 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
### Data Fields
|
| 50 |
+
|
| 51 |
+
- `file_path` (string): Absolute file path
|
| 52 |
+
- `git_repo` (string): Git repository root path
|
| 53 |
+
- `commit` (string): Git commit hash (40 chars)
|
| 54 |
+
- `branch` (string): Git branch name
|
| 55 |
+
- `remote` (string): Git remote URL
|
| 56 |
+
- `url` (string): GitHub/GitLab URL for the file
|
| 57 |
+
- `tracked` (boolean): Whether file is tracked in git
|
| 58 |
+
|
| 59 |
+
### Data Splits
|
| 60 |
|
| 61 |
+
Single dataset with 3,660,152 files (no train/test split).
|
| 62 |
+
|
| 63 |
+
## π Dataset Statistics
|
| 64 |
+
|
| 65 |
+
- **Total files**: 3,660,152
|
| 66 |
+
- **Files with git repo**: 2,366,334 (64.7%)
|
| 67 |
+
- **Tracked in git**: 1 (0.0%)
|
| 68 |
+
- **Untracked**: 2,366,333 (64.7%)
|
| 69 |
+
- **File size**: 437MB (Parquet, compressed)
|
| 70 |
+
- **Compression ratio**: ~6:1 (vs 763MB CSV)
|
| 71 |
+
|
| 72 |
+
## π Usage
|
| 73 |
+
|
| 74 |
+
### Load with Pandas
|
| 75 |
|
| 76 |
```python
|
| 77 |
import pandas as pd
|
| 78 |
|
| 79 |
+
# Load dataset
|
| 80 |
+
df = pd.read_parquet('hf://datasets/introspector/meta-introspector/indexes/files.parquet')
|
|
|
|
| 81 |
|
| 82 |
+
# Find Rust files
|
| 83 |
+
rust_files = df[df['file_path'].str.endswith('.rs')]
|
| 84 |
print(f"Found {len(rust_files)} Rust files")
|
| 85 |
|
| 86 |
+
# Find files by repository
|
| 87 |
+
repo_files = df[df['git_repo'].str.contains('meta-introspector')]
|
| 88 |
+
print(f"Found {len(repo_files)} files in meta-introspector")
|
| 89 |
```
|
| 90 |
|
| 91 |
+
### Query with DuckDB
|
| 92 |
+
|
| 93 |
+
```python
|
| 94 |
+
import duckdb
|
| 95 |
+
|
| 96 |
+
# SQL queries on Parquet
|
| 97 |
+
con = duckdb.connect()
|
| 98 |
+
result = con.execute("""
|
| 99 |
+
SELECT git_repo, COUNT(*) as file_count
|
| 100 |
+
FROM 'hf://datasets/introspector/meta-introspector/indexes/files.parquet'
|
| 101 |
+
WHERE git_repo != ''
|
| 102 |
+
GROUP BY git_repo
|
| 103 |
+
ORDER BY file_count DESC
|
| 104 |
+
LIMIT 10
|
| 105 |
+
""").fetchdf()
|
| 106 |
+
print(result)
|
| 107 |
```
|
| 108 |
|
| 109 |
+
### Load with Polars
|
| 110 |
|
| 111 |
+
```python
|
| 112 |
+
import polars as pl
|
| 113 |
+
|
| 114 |
+
# Fast columnar processing
|
| 115 |
+
df = pl.read_parquet('hf://datasets/introspector/meta-introspector/indexes/files.parquet')
|
| 116 |
+
|
| 117 |
+
# Filter and aggregate
|
| 118 |
+
rust_by_repo = (
|
| 119 |
+
df.filter(pl.col('file_path').str.ends_with('.rs'))
|
| 120 |
+
.groupby('git_repo')
|
| 121 |
+
.agg(pl.count().alias('rust_files'))
|
| 122 |
+
.sort('rust_files', descending=True)
|
| 123 |
+
)
|
| 124 |
+
print(rust_by_repo.head(10))
|
| 125 |
+
```
|
| 126 |
|
| 127 |
+
## π Use Cases
|
| 128 |
|
| 129 |
+
### Code Search
|
| 130 |
+
Find files across 3.66M indexed files with full git context.
|
| 131 |
+
|
| 132 |
+
### Provenance Tracking
|
| 133 |
+
Trace any file to its git commit, branch, and remote repository.
|
| 134 |
+
|
| 135 |
+
### Repository Analysis
|
| 136 |
+
Analyze code distribution, file types, and repository structures at scale.
|
| 137 |
+
|
| 138 |
+
### ML Training
|
| 139 |
+
Train models on real-world code data with git metadata for context.
|
| 140 |
+
|
| 141 |
+
### Research
|
| 142 |
+
Study large-scale code repositories and their evolution.
|
| 143 |
+
|
| 144 |
+
## π¬ Dataset Creation
|
| 145 |
+
|
| 146 |
+
### Source Data
|
| 147 |
+
|
| 148 |
+
Files were collected from `/mnt/data1` filesystem using parallel scanning with 24 workers.
|
| 149 |
+
|
| 150 |
+
### Data Collection
|
| 151 |
+
|
| 152 |
+
1. **Filesystem scan**: 3.66M files discovered
|
| 153 |
+
2. **Git mapping**: Each file associated with git repository
|
| 154 |
+
3. **Metadata extraction**: Commit hash, branch, remote URL
|
| 155 |
+
4. **Tracking status**: Checked if file is tracked in git
|
| 156 |
+
5. **Parquet export**: Columnar format with compression
|
| 157 |
+
|
| 158 |
+
### Performance
|
| 159 |
+
|
| 160 |
+
- **Scan time**: 12 seconds
|
| 161 |
+
- **Throughput**: ~305,000 files/second
|
| 162 |
+
- **Workers**: 24 parallel (rayon)
|
| 163 |
+
- **Caching**: Git info cached per repository (not per file)
|
| 164 |
+
|
| 165 |
+
### Tools Used
|
| 166 |
+
|
| 167 |
+
- `git_file_mapper.rs` - Rust tool for parallel file scanning
|
| 168 |
+
- `rayon` - Parallel processing
|
| 169 |
+
- `arrow` + `parquet` - Columnar storage
|
| 170 |
+
|
| 171 |
+
## π Dataset Characteristics
|
| 172 |
+
|
| 173 |
+
### File Types
|
| 174 |
+
|
| 175 |
+
The dataset includes all file types found in the scanned repositories:
|
| 176 |
+
- Source code (.rs, .py, .js, .c, .cpp, etc.)
|
| 177 |
+
- Configuration files (.toml, .json, .yaml, etc.)
|
| 178 |
+
- Documentation (.md, .txt, .rst, etc.)
|
| 179 |
+
- Build artifacts
|
| 180 |
+
- Binary files
|
| 181 |
+
|
| 182 |
+
### Repository Coverage
|
| 183 |
+
|
| 184 |
+
Files from 1,000+ git repositories including:
|
| 185 |
+
- Open source projects
|
| 186 |
+
- Local development repositories
|
| 187 |
+
- Nix store derivations
|
| 188 |
|
| 189 |
## π Related Datasets
|
| 190 |
|
|
|
|
| 195 |
|
| 196 |
This dataset is automatically updated from the [meta-introspector](https://github.com/meta-introspector/meta-introspector) project.
|
| 197 |
|
| 198 |
+
To contribute:
|
| 199 |
+
1. Run `git_file_mapper` from the project
|
| 200 |
+
2. Generate `data/indexes/files.parquet`
|
| 201 |
+
3. Submit updates via pull request
|
| 202 |
+
|
| 203 |
## π Citation
|
| 204 |
|
| 205 |
```bibtex
|
|
|
|
| 208 |
author={Meta-Introspector Team},
|
| 209 |
year={2026},
|
| 210 |
url={https://huggingface.co/datasets/introspector/meta-introspector},
|
| 211 |
+
note={3.66M+ files with git provenance and comprehensive analysis}
|
| 212 |
}
|
| 213 |
```
|
| 214 |
|
| 215 |
+
## π License
|
| 216 |
+
|
| 217 |
+
AGPL-3.0 - See LICENSE file for details.
|
| 218 |
+
|
| 219 |
---
|
| 220 |
|
| 221 |
**Generated**: 2026-01-17
|