Skip to content

Enhanced data reading capability - #82

Merged
jpn-- merged 17 commits into
ActivitySim:mainfrom
driftlesslabs:docs-update
Jul 30, 2026
Merged

Enhanced data reading capability#82
jpn-- merged 17 commits into
ActivitySim:mainfrom
driftlesslabs:docs-update

Conversation

@jpn--

@jpn-- jpn-- commented Jul 30, 2026

Copy link
Copy Markdown
Member

This pull request introduces several improvements to the documentation, testing workflow, and dependency management for the project. The most significant changes include enhanced memory management and test reliability in the CI workflow, updates to installation and development instructions to use uv, the addition of a new user guide for loading skims from various formats, and expanded support for Parquet-based skim loading. Dependency specifications have also been broadened and updated for better compatibility.

Continuous Integration and Testing Improvements:

  • Added memory management settings and swap space to the GitHub Actions workflow to prevent out-of-memory failures during numba compilation, including a memory watchdog and per-test isolation for more reliable test execution. [1] [2] [3]
  • Implemented caching of compiled sharrow flows to speed up repeated CI runs and reduce memory usage. [1] [2]

Documentation Enhancements:

  • Added a new walkthrough notebook, loading-skims.ipynb, demonstrating how to load skim matrices from Zarr, OMX, and Parquet formats, and updated the table of contents to include it. [1] [2]
  • Updated installation and development instructions in docs/intro.md to recommend using uv for all workflows, replacing conda-based instructions, and clarified testing and documentation build steps. [1] [2]

Feature Additions:

  • Documented the new sharrow.dataset.from_parquet_3d function in the API reference for loading 3D skim data from Parquet files.

Dependency Updates:

  • Broadened and updated package requirements in the workflow, pyproject.toml, and environment files to support newer versions and additional plugins (e.g., h5py, hdf5plugin, python-blosc2, and less restrictive version pins for core libraries). [1] [2] [3] [4]

Copilot AI and others added 17 commits July 26, 2026 17:22
The two activitysim-examples jobs have been failing with exit code 143
(runner terminated due to memory exhaustion). Mitigations:

- run each collected test in its own pytest process so memory is fully
  released between model runs
- restore/save the persistent sharrow flow cache (including numba
  on-disk cache files) across CI runs, so warm runs skip most numba
  compilation; saved even on failure to seed the cache
- set MALLOC_ARENA_MAX=2 to limit glibc arena memory retention and pin
  NUMBA_NUM_THREADS to the runner core count
- add a background memory monitor that samples system memory every 15s
  and reports a peak-usage summary at job end

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Iteration 2: per-test process isolation confirmed the two non-sharrow
MTC tests pass in under a minute each, but the sharrow-enabled test
exhausts runner memory on its own during cold-cache numba compilation
(~47 min in). The abrupt runner shutdown also skipped the if:always()
steps, so the flow cache was never saved and the memory report was lost.

Changes:
- add an 8GB swapfile to absorb the transient compilation memory peak
- stream memory samples into the live step log so the data survives an
  abrupt runner shutdown
- add a watchdog that stops pytest gracefully when memory (incl. swap)
  is nearly exhausted, so the cache-save step still runs; each attempt
  then saves whatever flows it compiled, and subsequent runs resume
  from that warm cache instead of starting over

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jpn--
jpn-- merged commit c65562c into ActivitySim:main Jul 30, 2026
13 checks passed
@jpn--
jpn-- deleted the docs-update branch July 30, 2026 15:36
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.

2 participants