Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Unknown-column warning hides removed model inputs behind raw source columns (ten-name cap)

Aperta
#609 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by reading the aggregated unknown-column warning implementation and the #531 tests in policyengine-core; the issue does not name their file paths. Compare the warning behavior with policyengine-us test tests/microsimulation/data/test_removed_mortgage_interest_inputs.py and its expected removed input names. Done means a dataset with more than ten unknown columns triggers a warning that names the registered removed input and its guidance, while the existing #531 tests still pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Follow-up to #530 / #531 (the aggregated unknown-column warning), found while removing two inputs from policyengine-us (PolicyEngine/policyengine-us#9605).

Problem

The warning names only the first ten unknown columns, sorted, plus a count. On a dataset that also carries raw source columns, those ten slots are taken by names that were never model variables, so a column for a removed model input is never named.

Measured 2026-09-25 by loading the certified US default dataset (populace_us_2024.h5@populace-us-2024-spm-20260909, sha256 6496cc43…) through policyengine_us.Microsimulation on the #9605 branch with policyengine-core 3.32.7. The single warning was:

The dataset contains 191 column(s) that do not match any variable in the tax-benefit system and were ignored: ACTC_CRD, AGI, ANN_VAL, A_AGE, A_ENRLW, A_EXPRRP, A_FAMREL, A_FAMTYP, A_FNLWGT, A_FTPT, … (181 more)

That branch deletes first_home_mortgage_interest and second_home_mortgage_interest, and the dataset carries both, but neither appears: uppercase survey columns sort first. The warning fires on this file whether or not a model input was removed, so it carries no signal there. On a dataset with no raw source columns it works as intended (policyengine-us test tests/microsimulation/data/test_removed_mortgage_interest_inputs.py asserts both names appear).

Options

  1. Removed-input registry (preferred). Let a tax-benefit system declare removed or renamed inputs (name → replacement or guidance). At dataset load, emit a separate warning naming every dataset column that matches the registry, independent of the ten-name cap. This is the only option that tells a user what to do.
  2. Full list at a lower level. Keep the capped WARNING and also log the complete sorted list at INFO or DEBUG.
  3. Ordering. List snake_case names (the model's convention) before other names, so removed inputs outrank raw survey columns. Cheap, but a heuristic.

Acceptance

  • A test that builds a dataset with more than ten unknown columns, one of them a registered removed input, and asserts the warning output names that input and its guidance.
  • The existing #531 tests still pass (known columns load unchanged; clean datasets stay quiet).

The data-side counterpart (certified files not shipping raw source columns or stale inputs) is tracked in PolicyEngine/microcosm#673.

Lingua principale
Python
Stelle
22
Fork
30
Merge medio
2g 19h
PR unite (30g)
25

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-core

Tutte le issue di PolicyEngine/policyengine-core

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.