Skip to content

Commit

Permalink
Use auto instead of /proc/cpuinfo
Browse files Browse the repository at this point in the history
We can't always rely on this working for all platforms.
Fixes #450

PiperOrigin-RevId: 489921823
  • Loading branch information
rosshemsley authored and OptaxDev committed Nov 21, 2022
1 parent 543e186 commit 5f0501b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ pytype `find optax/_src/ examples -name '*.py' | xargs` -k -d import-error
# Run tests using pytest.
# Change directory to avoid importing the package from repo root.
mkdir _testing && cd _testing
python -m pytest -n "$(grep -c ^processor /proc/cpuinfo)" --pyargs optax
python -m pytest -n auto --pyargs optax
cd ..

cd examples
python -m pytest -n "$(grep -c ^processor /proc/cpuinfo)" .
python -m pytest -n auto .
cd ..

# Build Sphinx docs.
Expand Down

0 comments on commit 5f0501b

Please sign in to comment.