Skip to content

docs: V38 à V40 au plan — le Data Studio, en commençant par un défaut de lecture - #51

Merged
dapiced merged 1 commit into
mainfrom
claude/labml-detailed-plan-nzc98m
Aug 22, 2026
Merged

docs: V38 à V40 au plan — le Data Studio, en commençant par un défaut de lecture#51
dapiced merged 1 commit into
mainfrom
claude/labml-detailed-plan-nzc98m

Conversation

@dapiced

@dapiced dapiced commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Inscrit au PLAN.md le plan d'amélioration du Data Studio demandé le 22/08/2026. Trois vagues, plan seulement : aucune n'est lancée sans commande explicite.

V38 — lecture fidèle

Le point principal n'est pas une fonctionnalité manquante mais un défaut du code livré. Papa.parse est appelé avec le seul skipEmptyLines: true — pas d'encodage, pas de séparateur décimal — et parseNumber finit sur Number(cleaned). Conséquence sur un export Excel français : 12,5 devient NaN, la colonne est classée texte au lieu de numérique, et toute la suite du pipeline l'encode en one-hot. Un fichier windows-1252 affiche Québec. Rien n'avertit, rien ne refuse — c'est précisément la partie qui contredit les règles du projet.

Correctif prévu : détection annoncée de l'encodage et du séparateur décimal, sélecteurs explicites délimiteur / encodage / décimal, et aperçu de 5 lignes avant de valider le chargement. Même passe pour les séparateurs de milliers et les dates 31/12/2025.

V39 — recette par colonne

RecipeOptions applique aujourd'hui missing et clipOutliers au fichier entier : une médiane a du sens pour un âge, aucun pour un code postal. La recette devient une liste ordonnée d'étapes par colonne, les réglages globaux actuels servant de valeurs par défaut, avec les stratégies qui manquent (médiane / moyenne / constante / catégorie « MANQUANT ») et un indicateur d'absence optionnel (col_absent) — imputer sans marquer détruit de l'information, et un champ vide l'est rarement au hasard.

V40 — validité et audit

Règles de validité nommées (âge de 200 ans, date future, pourcentage à 130, code postal malformé), cohérence inter-colonnes (date_fin < date_debut, total ≠ quantité × prix) dont le moteur est déjà le DuckDB de V29, profil de référence rejouable pour la dérive, diff avant/après des lignes modifiées, décomposition du score de qualité, export Parquet.

Refusés explicitement dans la vague : éditeur de cellules façon tableur (les retouches à la main cassent la reproductibilité), déduplication floue (faux positifs garantis sur noms et adresses), imputation par modèle (opaque, et elle fabrique des valeurs plausibles).

Ordre

Le paragraphe Ordering gagne une phrase : V38 passe devant V39 et V40 pour la même raison que V35 dans son groupe — son point principal est un défaut du code livré, pas une fonctionnalité. Poser des règles de validité sur des nombres mal lus signalerait le parseur, pas les données.

Vérifications

  • npm run format:check — OK
  • Modification limitée à PLAN.md ; aucun code applicatif touché.

Generated by Claude Code

… de lecture

V38 (lecture fidèle) passe en premier parce que son point principal est un
défaut du code livré, pas une fonctionnalité : Papa.parse est appelé avec le
seul skipEmptyLines et parseNumber finit sur Number(cleaned), donc un export
Excel français perd ses colonnes numériques en silence (12,5 -> NaN -> colonne
classée texte -> one-hot en aval), et un fichier windows-1252 affiche Québec.
Détection annoncée de l'encodage et du séparateur décimal, sélecteurs
explicites, aperçu de 5 lignes avant de valider le chargement.

V39 (recette par colonne) : RecipeOptions applique aujourd'hui missing et
clipOutliers au fichier entier. La recette devient une liste ordonnée d'étapes
par colonne, avec les stratégies manquantes (médiane / moyenne / constante /
catégorie MANQUANT) et un indicateur d'absence optionnel, parce qu'imputer sans
marquer détruit de l'information.

V40 (validité et audit) : règles de validité nommées, cohérence inter-colonnes
via le DuckDB de V29, profil de référence rejouable pour la dérive, diff
avant/après des lignes modifiées, décomposition du score, export Parquet.
Refusés explicitement : éditeur de cellules, déduplication floue, imputation
par modèle.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UKw6oNC8iZ9Kn7q6x4qom4
@dapiced
dapiced marked this pull request as ready for review August 22, 2026 19:04
Copilot AI lite review requested due to automatic review settings August 22, 2026 19:04
@dapiced
dapiced merged commit f0bc137 into main Aug 22, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new V38 plan entry contains documentation inaccuracies (encoding example and Papa.parse config wording) that could mislead readers.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Updates the project roadmap (PLAN.md) to introduce three new Data Studio waves (V38–V40) focused on correct file ingestion, per-column recipes, and auditable validity/drift—plus an ordering note explaining why V38 must precede V39/V40.

Changes:

  • Adds V38–V40 roadmap entries detailing planned Data Studio improvements (encoding/decimal detection, per-column recipe steps, validity + audit tooling).
  • Updates the Ordering rationale to explicitly prioritize V38 ahead of V39/V40.
File summaries
File Description
PLAN.md Adds V38–V40 Data Studio roadmap items and updates ordering rationale accordingly.
Review details

Suppressed comments (1)

PLAN.md:451

  • Papa.parse is described as being called with only skipEmptyLines: true and “nothing else”, but the current Data Studio worker config also sets callbacks like chunk, complete, and error (e.g. src/features/data/data.worker.ts). If the intent is “no delimiter/encoding-related options”, consider tightening the wording to avoid a factual mismatch.
| V38                   | **Data Studio: reading the file exactly as it was written.** The headline item is a **defect in shipped code, not a missing feature**. `Papa.parse` is called with `skipEmptyLines: true` and nothing else — no encoding, no decimal separator — and `parseNumber` ends in `Number(cleaned)`. A French Excel export therefore breaks silently: `12,5` becomes `NaN`, the column is classified **text** rather than numeric, and every downstream stage one-hot encodes what should have been a number; a windows-1252 file displays `Québec`. Nothing warns, nothing refuses — the pipeline simply produces a worse model. Fix: **detect encoding and decimal separator and announce both** (« séparateur décimal : virgule, détecté sur 412 valeurs »), expose explicit **delimiter / encoding / decimal** selectors for the cases detection cannot settle, and show a **5-row preview before committing to the load** so a wrong guess is caught in two seconds rather than three panels later. The same pass covers thousands separators and dates written `31/12/2025` instead of ISO.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Owner request (22/08/2026): what to improve in /data. The audit found a defect first: a French-locale CSV — the single most likely file this owner's users will open — loses its numeric columns silently, and silence is the part that violates the project's rules.                                                                                              |
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread PLAN.md
| V35 | **ML Lab: the number stops flattering itself.** Two of these are not missing features but **method defects in shipped code**, which is why they come first in a lab whose selling point is honest evaluation. **(1) The winner is picked on the test set.** `LeaderboardTable.tsx:42` sorts nine models by `primary` — the metric computed on test — and crowns `sorted[0]`. Taking the maximum of nine draws on ~180 test rows biases the headline figure upward; V20's paired bootstrap softens the comparison but the crowned number stays optimistic. Fix: a third split — train / validation / test — selecting on validation, reporting on test, and **showing the gap between the two**, which is itself the most useful lesson the lab can teach. **(2) The split is always random, even on dated data.** `splitIndices()` stratifies at random, full stop — while V10 already derives year/month/day from a date column and V8 does time series, so dated files arrive routinely. A random split puts the future in training and the past in test: the model looks excellent and collapses in production. Fix: detect a date column and offer a **chronological split** (oldest 80% trains), announced; same logic for a repeated identifier — the same customer on both sides is the same leak. Then two additions in the same spirit: a **target-leakage detector** — a lone column predicting at 99% is almost always a leak (« amount_refunded » predicting « fraud ») and must show as a warning, not a victory: small to write, striking to demonstrate, and nobody does it — and **repeated cross-validation for the leaderboard**, because ~180 test rows carry roughly ±3 points of standard deviation and ranking two models one point apart is meaningless; 5×2 CV with intervals makes the ranking defensible. | Owner request (22/08/2026): what to improve in /ml. The audit found two defects rather than gaps — a lab that sells honest evaluation cannot ship a headline figure it knows to be optimistic, nor a split that leaks on dated data. |
| V36 | **ML Lab: the gaps that were deliberately left open.** **Class imbalance** — weighting was explicitly descoped in V16; class weights in logistic regression, tree, forest and gbdt, announced like every other choice, finally complete what the threshold panel started. **Multiclass thresholds** — set aside since V16 and still open. **Choosing the ranking metric** — accuracy and RMSE are imposed today, while on an imbalanced problem F1 or recall is the right criterion and the ranking changes with it; small to build, and it makes the leaderboard answer the user's question rather than ours. **An ensemble of the best** — average or vote over the top three: typically 1–3 points, free in compute since the models are already trained, and it teaches why ensembling works. **What this wave deliberately does not do**: add a tenth model family (nine is plenty; a tenth improves neither honesty nor understanding), build an AutoML « we handle everything » mode (the opposite of a lab that shows its decisions), or bring in tabular deep learning (high cost, no gain at this scale, and no longer hand-written). | Each item was consciously deferred in an earlier wave rather than forgotten; grouping them keeps the descopes visible instead of letting them quietly become permanent. |
| V37 | **ML Lab: speed and the comfort of long sessions.** **Parallel training** — the zoo trains sequentially in a single worker; N workers means N cores, and at a million rows that is a different experience entirely. The V25 benches already exist to measure it before and after, so the gain is published rather than claimed. **Comparing more than two runs** — V21 compares two; three or four changes what the tool is for, and the diff machinery is already written. **Resuming an interrupted run** — closing the tab loses everything today, while V13 (artifacts) and V19 (persistence) already provide the storage; what is missing is a checkpoint between model families and the offer to resume. | Comes last on purpose: speed and comfort matter, but a faster wrong number is still a wrong number. V35 first, then V36, then this. |
| V38 | **Data Studio: reading the file exactly as it was written.** The headline item is a **defect in shipped code, not a missing feature**. `Papa.parse` is called with `skipEmptyLines: true` and nothing else — no encoding, no decimal separator — and `parseNumber` ends in `Number(cleaned)`. A French Excel export therefore breaks silently: `12,5` becomes `NaN`, the column is classified **text** rather than numeric, and every downstream stage one-hot encodes what should have been a number; a windows-1252 file displays `Québec`. Nothing warns, nothing refuses — the pipeline simply produces a worse model. Fix: **detect encoding and decimal separator and announce both** (« séparateur décimal : virgule, détecté sur 412 valeurs »), expose explicit **delimiter / encoding / decimal** selectors for the cases detection cannot settle, and show a **5-row preview before committing to the load** so a wrong guess is caught in two seconds rather than three panels later. The same pass covers thousands separators and dates written `31/12/2025` instead of ISO. | Owner request (22/08/2026): what to improve in /data. The audit found a defect first: a French-locale CSV — the single most likely file this owner's users will open — loses its numeric columns silently, and silence is the part that violates the project's rules. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants