-
Notifications
You must be signed in to change notification settings - Fork 2
Implement Google Cloud Batch for parallel policy impact calculations #29
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
Open
PavelMakarchuk
wants to merge
27
commits into
main
Choose a base branch
from
PavelMakarchuk/issue28
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.
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
… into PavelMakarchuk/issue28
- Added get_option1_dict through get_option8_dict functions to reforms.py - Refactored get_optionX_reform functions to use the dict functions - Updated compute_year.py to import and use dict functions for dynamic scoring - Dynamic scoring combines reform dicts with CBO labor supply elasticities
The results dictionary doesn't include a 'total_time' field, but the final summary tried to access it at lines 314-315, causing a KeyError that crashed the compute_year.py script after all reforms completed successfully. Removed the total_time and average_time lines from the final summary.
… unpacking
The dict unpacking syntax {**a, **b} was causing PolicyEngine to call
.update() on ParameterNode objects, which don't have that method.
This resulted in AttributeError when creating Reform objects for dynamic
scoring with CBO elasticities.
Fixed by manually iterating over keys instead of using dict unpacking.
This avoids ParameterNode.update() errors by creating two separate Reform objects and chaining them sequentially rather than merging their parameter dictionaries.
Created get_optionN_dynamic_dict() functions that return complete parameter dictionaries with CBO elasticities already merged. This avoids all runtime dict composition issues.
- Log at script start with system info - Log before/after each major operation - Log all function calls with parameters - Log dictionary sizes and object creation - Log timing for every step - This will help identify exactly where failures occur
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.
Fixes #28