-
Notifications
You must be signed in to change notification settings - Fork 10
Make the Calibration Database first class #488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
baogorek
wants to merge
8
commits into
main
Choose a base branch
from
db-work
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Migrate critical database infrastructure from junkyard repo: - Expand create_database_tables.py with Source, VariableGroup, and VariableMetadata tables, ConstraintOperation enum, and improved definition hash that includes parent_stratum_id - Add etl_national_targets.py for loading ~40 national calibration targets from CBO, Treasury/JCT, CMS, and other federal sources - Add utils/db_metadata.py with get_or_create helpers for sources, variable groups, and variable metadata - Add DATABASE_GUIDE.md documenting schema, stratum groups, ETL patterns, and SQL query examples - Standardize all ETL scripts to use calibration/policy_data.db path - Update Makefile database target to include national targets step Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
These functions were present in the junkyard repo but missing from the SEP version. Required by ETL scripts like etl_medicaid.py. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Switch the data target to use 2024 CPS data (March 2025 ASEC) instead of 2023. Add CPS_2024_Full for full-sample generation, update ExtendedCPS_2024 and local area calibration to use it. Remove CPS_2021/2022/2023_Full, PooledCPS, Pooled_3_Year_CPS_2023, ExtendedCPS_2023, dead code, and unused exports. Update database ETL scripts for strata, IRS SOI, Medicaid, and SNAP. Trim cps.py __main__ to generate only CPS_2024_Full. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
Author
|
Wow this was painful. |
… strata Replace simplified DB pipeline with full implementation: - IRS SOI: 19 conditional strata groups (100-118) with filer population layer - Variables: income_tax_before_credits, rental_income, self_employment_income, net_capital_gains, and complete AGI distribution with tax_unit_count - Medicaid: 2024 admin data (CD survey disabled pending 119th Congress remap) - All ETL extract functions now use raw_cache for offline iteration New files: validate_hierarchy.py, migrate_stratum_group_ids.py, IRS_SOI_DATA_ISSUE.md Verified: 53 target groups, 32,781 targets, X_sparse (32781, 4577564) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Modal Volume staging for persistent cache
- Implement parallel build workers (configurable --num-workers)
- Add manifest validation with SHA256 checksums
- Add retry logic with exponential backoff for HF uploads
- Version files under v{version}/ paths
- Update latest.json atomically after all uploads succeed
- Add --skip-upload flag for build-only testing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There will be a lot to say here
This is updating targets where possible
It is also basing local area calibration on 2024 instead of 2023.
Scope is increasing and I want to go ahead and take care of #386 and #387.