Skip to content

Conversation

@PavelMakarchuk
Copy link
Contributor

Fixes #28

- 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Google Cloud Batch for parallel policy impact calculations

2 participants