|
1 | | -.PHONY: all format test test-unit test-integration install download upload docker documentation data validate-data calibrate calibrate-build publish-local-area upload-calibration upload-dataset upload-database push-to-modal build-data-modal build-matrices calibrate-modal calibrate-modal-national calibrate-both stage-h5s stage-national-h5 stage-all-h5s pipeline validate-staging validate-staging-full upload-validation check-staging check-sanity clean build paper clean-paper presentations database database-refresh promote-database promote-dataset promote build-h5s validate-local refresh-soi-targets push-pr-branch |
| 1 | +.PHONY: all format test test-unit test-integration install download upload docker documentation data validate-data calibrate calibrate-build publish-local-area upload-calibration upload-dataset push-to-modal build-data-modal build-matrices calibrate-modal calibrate-modal-national calibrate-both stage-h5s stage-national-h5 stage-all-h5s pipeline validate-staging validate-staging-full upload-validation check-staging check-sanity clean build paper clean-paper presentations database database-refresh promote-dataset promote build-h5s validate-local refresh-soi-targets push-pr-branch |
2 | 2 |
|
3 | 3 | SOI_SOURCE_YEAR ?= 2021 |
4 | 4 | SOI_TARGET_YEAR ?= 2023 |
5 | 5 |
|
| 6 | +YEAR ?= 2024 |
| 7 | + |
6 | 8 | GPU ?= T4 |
7 | 9 | EPOCHS ?= 1000 |
8 | 10 | NATIONAL_GPU ?= T4 |
@@ -75,38 +77,29 @@ documentation-dev: |
75 | 77 | database: |
76 | 78 | rm -f policyengine_us_data/storage/calibration/policy_data.db |
77 | 79 | python policyengine_us_data/db/create_database_tables.py |
78 | | - python policyengine_us_data/db/create_initial_strata.py |
79 | | - python policyengine_us_data/db/etl_national_targets.py |
80 | | - python policyengine_us_data/db/etl_age.py |
81 | | - python policyengine_us_data/db/etl_medicaid.py |
82 | | - python policyengine_us_data/db/etl_snap.py |
83 | | - python policyengine_us_data/db/etl_state_income_tax.py |
84 | | - python policyengine_us_data/db/etl_irs_soi.py |
85 | | - python policyengine_us_data/db/etl_pregnancy.py |
| 80 | + python policyengine_us_data/db/create_initial_strata.py --year $(YEAR) |
| 81 | + python policyengine_us_data/db/etl_national_targets.py --year $(YEAR) |
| 82 | + python policyengine_us_data/db/etl_age.py --year $(YEAR) |
| 83 | + python policyengine_us_data/db/etl_medicaid.py --year $(YEAR) |
| 84 | + python policyengine_us_data/db/etl_snap.py --year $(YEAR) |
| 85 | + python policyengine_us_data/db/etl_state_income_tax.py --year $(YEAR) |
| 86 | + python policyengine_us_data/db/etl_irs_soi.py --year $(YEAR) |
| 87 | + python policyengine_us_data/db/etl_pregnancy.py --year $(YEAR) |
86 | 88 | python policyengine_us_data/db/validate_database.py |
87 | 89 |
|
88 | 90 | database-refresh: |
89 | 91 | rm -f policyengine_us_data/storage/calibration/policy_data.db |
90 | 92 | rm -rf policyengine_us_data/storage/calibration/raw_inputs/ |
91 | 93 | $(MAKE) database |
92 | 94 |
|
93 | | -promote-database: |
94 | | - sqlite3 policyengine_us_data/storage/calibration/policy_data.db "PRAGMA wal_checkpoint(TRUNCATE);" |
95 | | - cp policyengine_us_data/storage/calibration/policy_data.db \ |
96 | | - $(HF_CLONE_DIR)/calibration/policy_data.db |
97 | | - rm -rf $(HF_CLONE_DIR)/calibration/raw_inputs |
98 | | - cp -r policyengine_us_data/storage/calibration/raw_inputs \ |
99 | | - $(HF_CLONE_DIR)/calibration/raw_inputs |
100 | | - @echo "Copied DB and raw_inputs to HF clone. Now cd to HF repo, commit, and push." |
101 | | - |
102 | 95 | promote-dataset: |
103 | 96 | python -c "from policyengine_us_data.utils.huggingface import upload; \ |
104 | 97 | upload('policyengine_us_data/storage/source_imputed_stratified_extended_cps_2024.h5', \ |
105 | 98 | 'policyengine/policyengine-us-data', \ |
106 | 99 | 'calibration/source_imputed_stratified_extended_cps.h5')" |
107 | 100 | @echo "Dataset promoted to HF." |
108 | 101 |
|
109 | | -data: download |
| 102 | +data: download database |
110 | 103 | python policyengine_us_data/utils/uprating.py |
111 | 104 | python policyengine_us_data/datasets/acs/acs.py |
112 | 105 | python policyengine_us_data/datasets/cps/cps.py |
@@ -174,13 +167,6 @@ upload-dataset: |
174 | 167 | 'calibration/source_imputed_stratified_extended_cps.h5')" |
175 | 168 | @echo "Dataset uploaded to HF." |
176 | 169 |
|
177 | | -upload-database: |
178 | | - python -c "from policyengine_us_data.utils.huggingface import upload; \ |
179 | | - upload('policyengine_us_data/storage/calibration/policy_data.db', \ |
180 | | - 'policyengine/policyengine-us-data', \ |
181 | | - 'calibration/policy_data.db')" |
182 | | - @echo "Database uploaded to HF." |
183 | | - |
184 | 170 | push-to-modal: |
185 | 171 | modal volume put pipeline-artifacts \ |
186 | 172 | policyengine_us_data/storage/calibration/calibration_weights.npy \ |
|
0 commit comments