You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(v7-g02,v7-g04): doc_id helper + corpus_stats sidecar in DataInspector
Two honest-closure data-pipeline gaps:
V7-G02: doc_id_assignment helper lived at
cppmega_v4/data/doc_id_assignment.py but clang_enriched_to_parquet
fell back to a per-source-file synthesized id when source_doc_id was
missing. Same logical doc across shards got different ids.
V7-G04: compute_corpus_stats existed but the parquet emit path never
wrote a sidecar, so DataInspector had nothing to surface.
- scripts/nanochat_data/clang_enriched_to_parquet.py: when
source_doc_id is missing, prefer stable_doc_signature(record) from
the helper. Falls back to the legacy filename:index on exception.
Also writes {shard}.corpus_stats.json next to each parquet shard.
- jsonrpc/data_methods.py PreviewParquetResult: new corpus_stats:
dict | None field; _read_corpus_stats_sidecar loads the JSON if
present, returns None for legacy shards.
- vbgui/components/DataInspector.tsx: CorpusStats interface +
data-corpus-stats block rendering token_coverage_pct, doc-length
p50/p90/p99, n_docs, long_tail_count.
- tests/v4/test_corpus_stats_sidecar.py: sidecar present → field
populated; missing → field is null.
- e2e 86: visual assertion — pyarrow stub-shard + synthetic sidecar
→ DataInspector block shows '42.50%', '3/4/5', '7'.
0 commit comments