-
Notifications
You must be signed in to change notification settings - Fork 118
Patch sharrow sandag #1009
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
Patch sharrow sandag #1009
Conversation
- if there is no time period we should still be able to get time-agnostic values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request upgrades the sharrow dependency from version 2.9.1 to 2.15.0 and adds enhanced error handling for sharrow-related issues. The changes include better handling of AssertionErrors when setting skim wrapper targets, improved error messages for missing purpose_index_num configuration, and an optional parameter to control error strictness.
- Updated sharrow minimum version requirement from 2.9.1 to 2.15.0
- Added error handling and informative error messages for trip destination model configuration issues
- Enhanced
set_skim_wrapper_targetswith optional error suppression and warning logging
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| uv.lock | Updated sharrow package from version 2.14.0 to 2.15.0 with new hashes and reduced revision number |
| pyproject.toml | Bumped sharrow minimum version requirement from >=2.9.1 to >=2.15 |
| activitysim/core/simulate.py | Added allow_partial_success parameter to set_skim_wrapper_targets with AssertionError handling and warning logging |
| activitysim/abm/models/trip_destination.py | Added try-except block to catch and provide helpful error message for missing purpose_index_num configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
i-am-sijia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
This pull request introduces improvements to error handling and logging in the trip destination model and skim wrapper setup, as well as an update to the minimum required version of the
sharrowdependency. The main focus is on providing more informative error messages and warnings to help diagnose configuration issues, particularly when using sharrow optimizations.Note: nothing in this PR is actually needed to solve problems with the SANDAG example running with sharrow -- all the problems are solved by the bug fix in the sharrow 2.15 update. This PR simply requires we use that fixed dependency, and adds notes about what needs to be done in models when they are not set up correctly for sharrow.
Error handling and logging improvements:
run_trip_destinationto catchKeyErrorwhenpurpose_index_numis missing, logging a detailed error message to guide users on the required configuration for sharrow-optimized runs. [1] [2]set_skim_wrapper_targetsfunction to optionally allow partial success when setting dataframe targets for skims. Now, assertion errors caused by missing required keys are collected and logged as warnings instead of always raising exceptions, improving robustness and debuggability. [1] [2]Dependency update:
sharrowpackage from2.9.1to2.15inpyproject.toml, ensuring compatibility with recent features and fixes.