CensusCountyBusinessPatterns: optimize pipeline runtime and update validation - #2219
Open
kartik-s21 wants to merge 57 commits into
Open
kartik-s21 wants to merge 57 commits into
kartik-s21 wants to merge 57 commits into
Conversation
Code fix unenergy
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces parallel processing for downloading and processing Census County Business Patterns data, caches the StatVars MCF locally to optimize performance, and removes golden data validation checks. The review feedback highlights several critical improvement opportunities: streaming files directly in main.py to avoid potential Out-Of-Memory (OOM) errors during parallel execution, tracking and failing fast on sharding failures in Step 1 of shard_input_csv.sh, and ensuring proper error propagation inside the split_csv shell function.
kartik-s21
force-pushed
the
fix-census-cbp-validation
branch
from
September 11, 2026 11:07
87e0fc4 to
34050f0
Compare
… non-empty output
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
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.
This PR resolves validation failures and major performance bottlenecks in
CensusCountyBusinessPatterns:Fault Tolerance & Reliability:
shard_input_csv.sh.[ -s "$output_file" ]) and fail-fast termination (exit 1) if any shard fails after all attempts, preventing silent data drops.Verification
PYTHONPATH=scripts/census_county_business_patterns python3 scripts/census_county_business_patterns/censuscountybusinesspatterns_test.py(Passed)python3 -m py_compile scripts/census_county_business_patterns/main.py(Passed)bash -n scripts/census_county_business_patterns/shard_input_csv.sh(Passed)python3 -m json.tool scripts/census_county_business_patterns/validation_config.json(Passed)