Skip to content

Commit c31e88a

Browse files
baogorekclaude
andcommitted
Restore HF transport for end-to-end Modal pipeline
Keep upload-dataset and skip_download=False defaults so the full pipeline (data_build → calibrate → stage-h5s) works via HF transport. skip_download is available as opt-in for local push-to-modal workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 79e9f55 commit c31e88a

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ upload-calibration:
143143
upload_calibration_artifacts()"
144144

145145
upload-dataset:
146-
@echo "NOTE: source_imputed H5 is an intermediate artifact."
147-
@echo "Use 'make push-to-modal' to push to Modal volume,"
148-
@echo "or 'make promote-dataset' to publish to HF at promotion time."
146+
python -c "from policyengine_us_data.utils.huggingface import upload; \
147+
upload('policyengine_us_data/storage/source_imputed_stratified_extended_cps_2024.h5', \
148+
'policyengine/policyengine-us-data', \
149+
'calibration/source_imputed_stratified_extended_cps.h5')"
150+
@echo "Dataset uploaded to HF."
149151

150152
upload-database:
151153
python -c "from policyengine_us_data.utils.huggingface import upload; \
@@ -186,7 +188,8 @@ calibrate-both:
186188

187189
stage-h5s:
188190
modal run modal_app/local_area.py::main \
189-
--branch $(BRANCH) --num-workers $(NUM_WORKERS)
191+
--branch $(BRANCH) --num-workers $(NUM_WORKERS) \
192+
$(if $(SKIP_DOWNLOAD),--skip-download)
190193

191194
stage-national-h5:
192195
modal run modal_app/local_area.py::main_national \
@@ -221,7 +224,7 @@ check-sanity:
221224
python -m policyengine_us_data.calibration.validate_staging \
222225
--sanity-only --area-type states --areas NC
223226

224-
pipeline: data push-to-modal build-matrices calibrate-both stage-all-h5s
227+
pipeline: data upload-dataset build-matrices calibrate-both stage-all-h5s
225228
@echo ""
226229
@echo "========================================"
227230
@echo "Pipeline complete. H5s are in HF staging."

modal_app/local_area.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ def coordinate_publish(
568568
branch: str = "main",
569569
num_workers: int = 8,
570570
skip_upload: bool = False,
571-
skip_download: bool = True,
571+
skip_download: bool = False,
572572
) -> str:
573573
"""Coordinate the full publishing workflow."""
574574
setup_gcp_credentials()
@@ -780,7 +780,7 @@ def main(
780780
branch: str = "main",
781781
num_workers: int = 8,
782782
skip_upload: bool = False,
783-
skip_download: bool = True,
783+
skip_download: bool = False,
784784
):
785785
"""Local entrypoint for Modal CLI."""
786786
result = coordinate_publish.remote(

0 commit comments

Comments
 (0)