Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
318ab72
merge reroll
jpn-- Apr 30, 2026
496fd26
add fast channel test
jpn-- Apr 30, 2026
94fda02
configurable RNG channel type
jpn-- May 1, 2026
a08b9d8
remove extra gitignores
jpn-- May 1, 2026
7ed8fff
change default from fast to simple
jpn-- May 1, 2026
66d0540
reseed only when needed
jpn-- May 2, 2026
1275cf0
SFC64 with quick entropy
jpn-- May 3, 2026
235e929
reseed in tests
jpn-- May 3, 2026
78a9116
update test targets
jpn-- May 3, 2026
aa0fbde
fix tests
jpn-- May 3, 2026
2ee22df
add a script to demonstrate random runtime performance gains
jpn-- May 3, 2026
44f8ced
fix test targets
jpn-- May 3, 2026
636c0b2
performance check script
jpn-- May 3, 2026
84767ca
action to run performance checks
jpn-- May 3, 2026
b315358
temporary push trigger
jpn-- May 3, 2026
3a1cf68
updates for push
jpn-- May 3, 2026
bcbdc25
make it run on windows
jpn-- May 3, 2026
52adc1f
add os to artifact filename
jpn-- May 3, 2026
657bf78
use fold-in style reseeding
jpn-- May 3, 2026
ac30986
update test targets for faster seeds
jpn-- May 3, 2026
acd48b0
update test targets
jpn-- May 3, 2026
bb18f29
Add complete fast-channel choice API
jpn-- Aug 8, 2026
02155de
Support RNG offset resets in fast channels
jpn-- Aug 8, 2026
c016b1e
Preserve normal draw shape compatibility
jpn-- Aug 8, 2026
fecc87c
Declare cffi as a runtime dependency
jpn-- Aug 8, 2026
f44ea6b
Preserve destination logsum regression coverage
jpn-- Aug 8, 2026
61f5b9d
Make performance checks opt-in
jpn-- Aug 8, 2026
763a8a0
Align RNG defaults and benchmark documentation
jpn-- Aug 8, 2026
bbb9423
Fix quick PCG64 state initialization
jpn-- Aug 9, 2026
36d429c
Document random channel configuration
jpn-- Aug 9, 2026
6b1c5f1
Validate quick entropy streams
jpn-- Aug 9, 2026
9061aa7
Freeze fast RNG reproducibility contract
jpn-- Aug 9, 2026
5eb3cb6
Correct and expand RNG benchmarks
jpn-- Aug 9, 2026
1e29011
address broadcasting concern
jpn-- Aug 9, 2026
bcce455
improved docs on randomness
jpn-- Aug 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/performance-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Performance Checks

# Runs performance benchmark scripts from other_resources/performance-checks/
# manually on demand. Use the `scripts` input to choose which scripts to run.

on:
workflow_dispatch:
inputs:
scripts:
description: >-
Comma-separated list of script filenames to run from
other_resources/performance-checks/ (e.g.
"fast-channel-random.py" or "fast-channel-random.py,other-script.py").
Use "all" to run every *.py script found in that directory.
required: false
default: "all"
type: string
python-version:
description: >-
Python version to use (must be available via setup-python and
compatible with the uv.lock in this repo).
required: false
default: "3.11"
type: string

jobs:
discover:
name: Discover scripts
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v6

- name: Build script matrix
id: build-matrix
shell: python
env:
REQUESTED_SCRIPTS: ${{ inputs.scripts }}
run: |
import json, os, pathlib, sys

scripts_dir = pathlib.Path("other_resources/performance-checks")
requested = os.environ.get("REQUESTED_SCRIPTS", "").strip()

all_scripts = sorted(p.name for p in scripts_dir.glob("*.py"))

if not all_scripts:
print("::error::No *.py scripts found in other_resources/performance-checks/")
sys.exit(1)

# Treat an omitted or empty input like the explicit "all" keyword.
if not requested or requested.lower() == "all":
selected = all_scripts
else:
candidates = [s.strip() for s in requested.split(",") if s.strip()]
missing = [c for c in candidates if c not in all_scripts]
if missing:
print(f"::error::The following requested scripts were not found: {missing}")
print(f"::error::Available scripts: {all_scripts}")
sys.exit(1)
selected = candidates

matrix = {"script": selected}
print(f"Selected scripts: {selected}")
with open(os.environ["GITHUB_OUTPUT"], "a") as fh:
fh.write(f"matrix={json.dumps(matrix)}\n")

run-script:
name: "Run ${{ matrix.script }} (${{ matrix.os }})"
needs: discover
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
script: ${{ fromJson(needs.discover.outputs.matrix).script }}

# Force UTF-8 I/O on Windows (default console encoding is cp1252 which
# cannot represent box-drawing characters used in benchmark output).
env:
PYTHONUTF8: "1"

defaults:
run:
# bash is available on all GitHub-hosted runners (Git Bash on Windows)
# and gives us consistent behaviour for tee, path separators, etc.
shell: bash

steps:
- uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Set up Python ${{ inputs.python-version || '3.11' }}
uses: actions/setup-python@v6
with:
python-version: ${{ inputs.python-version || '3.11' }}

- name: Install activitysim
run: |
uv sync --locked

- name: Run ${{ matrix.script }}
run: |
set -o pipefail
uv run python other_resources/performance-checks/${{ matrix.script }} \
2>&1 | tee perf-output-${{ matrix.os }}-${{ matrix.script }}.txt

- name: Upload output
if: always()
uses: actions/upload-artifact@v7
with:
# artifact names must be unique across the matrix, so include the OS
name: perf-output-${{ matrix.os }}-${{ matrix.script }}
path: perf-output-${{ matrix.os }}-${{ matrix.script }}.txt
retention-days: 90
6 changes: 0 additions & 6 deletions activitysim/abm/test/test_pipeline/output/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion activitysim/abm/test/test_pipeline/output/cache/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion activitysim/abm/test/test_pipeline/output/trace/.gitignore

This file was deleted.

Loading
Loading