Skip to content

Commit

Permalink
Merge pull request #760 from camsys/fix-windows-2zone
Browse files Browse the repository at this point in the history
Fixes windows error on large MAZ systems
  • Loading branch information
jpn-- authored Dec 21, 2023
2 parents a793094 + d2db43f commit cb3762f
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 35 deletions.
96 changes: 90 additions & 6 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand Down Expand Up @@ -131,7 +145,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand Down Expand Up @@ -215,7 +243,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand Down Expand Up @@ -298,7 +340,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand Down Expand Up @@ -351,7 +407,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install activitysim
Expand Down Expand Up @@ -403,7 +473,21 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
run: |
mamba env update -n asim-test -f conda-environments/github-actions-tests.yml
mamba install --yes \
"psutil=5.9.5" \
"pydantic=1.10.13" \
"pypyr=5.8.0" \
"pytables=3.6.1" \
"pytest-cov" \
"pytest-regressions=2.5.0" \
"scikit-learn=1.2.2" \
"sharrow>=2.6.0" \
"simwrapper=1.8.5" \
"xarray=2023.2.0" \
"zarr=2.14.2" \
"zstandard=0.21.0"
if: steps.cache.outputs.cache-hit != 'true'

- name: Install Larch
Expand Down
9 changes: 8 additions & 1 deletion activitysim/core/los.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,14 @@ def get_mazpairs(self, omaz, dmaz, attribute):
# how="left")[attribute]

# synthetic index method i : omaz_dmaz
i = np.asanyarray(omaz) * self.maz_ceiling + np.asanyarray(dmaz)
if self.maz_ceiling > 32767:
# too many MAZs, or un-recoded MAZ ID's that are too large
# will overflow a 32-bit index, so upgrade to 64bit.
i = np.asanyarray(omaz, dtype=np.int64) * np.int64(
self.maz_ceiling
) + np.asanyarray(dmaz, dtype=np.int64)
else:
i = np.asanyarray(omaz) * self.maz_ceiling + np.asanyarray(dmaz)
s = util.quick_loc_df(i, self.maz_to_maz_df, attribute)

# FIXME - no point in returning series?
Expand Down
56 changes: 28 additions & 28 deletions conda-environments/github-actions-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ channels:
- conda-forge
dependencies:
- pip
- black >= 22.0,<23
- coveralls
- cytoolz = 0.12.*
- dask = 2023.3.*
- isort
- nbmake
- numba = 0.56.*
- numpy = 1.23.*
- openmatrix = 0.3.*
- black = 22.12.0
- coveralls = 3.3.1
- cytoolz = 0.12.2
- dask = 2023.3.2
- isort = 5.12.0
- nbmake = 1.4.6
- numba = 0.56.4
- numpy = 1.23.5
- openmatrix = 0.3.5.0
- orca = 1.8
- pandas = 1.4.*
- platformdirs = 3.2.*
- psutil = 5.9.*
- pyarrow = 11.*
- pydantic = 1.10.*
- pypyr = 5.8.*
- pytables >= 3.5.1,<3.7 # orca's constraint
- pytest = 7.2.*
- pytest-cov
- pytest-regressions
- pyyaml = 6.*
- requests = 2.28.*
- ruff
- scikit-learn = 1.2.*
- sharrow >= 2.6.0
- simwrapper > 1.7
- xarray = 2023.2.*
- zarr = 2.14.*
- zstandard
- pandas = 1.4.4
#- platformdirs = 3.2.0 ##
#- psutil = 5.9.5
#- pyarrow = 11.0.0 ##
#- pydantic = 1.10.13
#- pypyr = 5.8.0
#- pytables = 3.6.1 # orca's constraint ##
#- pytest = 7.2.2 ##
#- pytest-cov = 4.1.0
#- pytest-regressions = 2.5.0
#- pyyaml = 6.0.1 #ok
#- requests = 2.28.2
#- ruff = 0.1.1
#- scikit-learn = 1.2.2
#- sharrow >= 2.6.0
#- simwrapper = 1.8.5
#- xarray = 2023.2.0
#- zarr = 2.14.2
#- zstandard = 0.21.0

0 comments on commit cb3762f

Please sign in to comment.