Support reading skims from Parquet files, in addition to OMX - #1101
Support reading skims from Parquet files, in addition to OMX#1101jpn-- wants to merge 2 commits into
Conversation
* Initial plan * Add parquet skim reading support (dense row/col-major + sparse) * Fix docstring typo found in code review * Avoid duplicate array creation in dense layout detection * Address review comments: searchsorted, table[col] indexing, caching, docstring * Support Parquet skims in Sharrow runs * Format Parquet skim tests * Require Sharrow 2.16 and update uv lock * Use released Sharrow from PyPI * Fix Parquet skim loading across sparse and mixed sources Normalize dense skims with nonascending zone IDs and zero-fill missing sparse OD pairs. Preserve time-period pages when merging OMX and Parquet sources. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jeff Newman <jeff@driftless.xyz>
|
@amsamimi I cannot formally make you a GitHub "reviewer" on this unless you accept the invitation to join the ActivitySim org, but since this addresses the issue you opened, you should definitely review it anyway 😉 |
amsamimi
left a comment
There was a problem hiding this comment.
A Sharrow-enabled smoke test completed successfully using the following configuration:
households_sample_size: 200
num_processes: 1
sharrow: true
models:
- initialize_landuse
- initialize_households
- compute_accessibility
|
Thanks for reviewing this @amsamimi. At our recent engineering meeting, we also discussed that functional correctness is a necessary but not sufficient criteria for acceptance of new features; performance impacts are also relevant. While your smoke test is valuable, it would also be important to know if the new code is performing adequately. For this PR it may be possible to check that simply from the logs of the smoke test -- the main effect is at skim loading, which happens similarly for a full model run or this tiny piece of one. Can you look and see what the time needed to load parquet skims is, and compare against the equivalent OMX time on your same underlying data? |
Closes #970
This pull request adds support for reading skim files in Parquet format in addition to the existing OMX format. The changes allow both dense and sparse Parquet files to be auto-detected and mixed with OMX files in the same workflow, with no changes required to existing settings other than using the
.parquetor.pqfile extension. The implementation includes updates to documentation, configuration, and the skim loading logic, ensuring compatibility with legacy workflows and Sharrow 2.16+ features.Support for Parquet skim files:
.parquetor.pqextensions) alongside OMX files. Parquet files can be dense or sparse and are supported by both legacy and Sharrow-based loaders. [1] [2] [3]network.pyto describe Parquet skim file support and usage. [1] [2] [3]Skim data loading and handling:
Codebase and API updates: