Skip to content

Commit

Permalink
Merge pull request google-deepmind#1316 from google-deepmind:lanctot-…
Browse files Browse the repository at this point in the history
…patch-65

PiperOrigin-RevId: 731759078
Change-Id: Iec573e04948d6282d8979e635e85e5e6c62fcf64
  • Loading branch information
lanctot committed Feb 27, 2025
2 parents 7e1673b + 3ce3a32 commit 6d024a3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,23 @@ jobs:
[[ "${OS_TYPE}" = "Darwin" ]] && ./install.sh `which python${OS_PYTHON_VERSION}`
[[ "${OS_TYPE}" = "Linux" ]] && ./install.sh `which python3`
# These are necessary to install what is necessary for the build and for the full tests below.
${CI_PYBIN} -m pip install --upgrade pip
${CI_PYBIN} -m pip --version
[[ "${OS_TYPE}" = "Darwin" ]] && ${CI_PYBIN} -m pip install pipx
${CI_PYBIN} -m pip install --upgrade setuptools
${CI_PYBIN} -m pip install --upgrade -r requirements.txt -q
source ./open_spiel/scripts/python_extra_deps.sh ${CI_PYBIN}
${CI_PYBIN} -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_JAX_DEPS
${CI_PYBIN} -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_PYTORCH_DEPS
${CI_PYBIN} -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS
${CI_PYBIN} -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_MISC_DEPS
${CI_PYBIN} -m pip install twine
${CI_PYBIN} -m pip install cibuildwheel==2.22.0
${CI_PYBIN} -m venv ./venv
source ./venv/bin/activate
python -m pip install --upgrade pip
python -m pip --version
[[ "${OS_TYPE}" = "Darwin" ]] && python -m pip install pipx
python -m pip install --upgrade setuptools
python -m pip install --upgrade -r requirements.txt -q
source ./open_spiel/scripts/python_extra_deps.sh python
python -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_JAX_DEPS
python -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_PYTORCH_DEPS
python -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS
python -m pip install --no-cache-dir --upgrade $OPEN_SPIEL_PYTHON_MISC_DEPS
python -m pip install twine
python -m pip install cibuildwheel==2.22.0
- name: Build sdist
run: |
source ./venv/bin/activate
pipx run build --sdist
twine check dist/*.tar.gz
Expand All @@ -104,14 +107,17 @@ jobs:
- name: Build bdist_wheel and run tests
run: |
[[ "${OS_TYPE}" = "Darwin" ]] && xcodebuild -version
${CI_PYBIN} -m cibuildwheel --output-dir wheelhouse
source ./venv/bin/activate
python -m cibuildwheel --output-dir wheelhouse
ls -l wheelhouse
# Install the built wheel and run the full tests on this host. The full
# tests include all the ones that use the machine learning libraries,
# such as Tensorflow, PyTorch, and JAX.
- name: Install bdist_wheel and full tests
run: ./open_spiel/scripts/test_wheel.sh full `pwd` ${CI_PYBIN}
run: |
source ./venv/bin/activate
./open_spiel/scripts/test_wheel.sh full `pwd` python
- uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions open_spiel/scripts/python_extra_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ elif verlt $PY_VER 3.12; then
echo "Detected Python version in {3.10, 3.11}"
export OPEN_SPIEL_PYTHON_PYTORCH_DEPS="torch==2.1.0"
export OPEN_SPIEL_PYTHON_JAX_DEPS="jax==0.4.20 jaxlib==0.4.20 dm-haiku==0.0.10 optax==0.1.7 chex==0.1.84 rlax==0.1.6 distrax==0.1.4"
export OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS="numpy==1.26.1 tensorflow==2.14.0 tensorflow-probability==0.22.1 tensorflow_datasets==4.9.2 keras==2.14.0"
export OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS="numpy==1.26.1 tensorflow==2.14.0 tensorflow-probability==0.22.1 tensorflow_datasets==4.9.7 keras==2.14.0"
export OPEN_SPIEL_PYTHON_MISC_DEPS="IPython==5.8.0 networkx==3.2 matplotlib==3.5.2 mock==4.0.2 nashpy==0.0.19 scipy==1.11.3 testresources==2.0.1 cvxopt==1.3.1 cvxpy==1.4.1 ecos==2.0.10 osqp==0.6.2.post5 clu==0.0.6 flax==0.5.3"
else
echo "Detected Python version >= 3.12"
export OPEN_SPIEL_PYTHON_PYTORCH_DEPS="torch==2.2.2"
export OPEN_SPIEL_PYTHON_JAX_DEPS="jax==0.4.26 jaxlib==0.4.26 dm-haiku==0.0.12 optax==0.2.2 chex==0.1.86 rlax==0.1.6 distrax==0.1.5"
export OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS="numpy==1.26.4 tensorflow==2.16.1 tensorflow_datasets==4.9.4 keras==3.1.1"
export OPEN_SPIEL_PYTHON_TENSORFLOW_DEPS="numpy==1.26.4 tensorflow==2.16.1 tensorflow_datasets==4.9.7 keras==3.1.1"
export OPEN_SPIEL_PYTHON_MISC_DEPS="IPython==8.23.0 networkx==3.3 matplotlib==3.8.4 mock==5.1.0 nashpy==0.0.41 scipy==1.11.4 testresources==2.0.1 cvxopt==1.3.2 cvxpy==1.4.2 ecos==2.0.13 osqp==0.6.5 clu==0.0.11 flax==0.8.2"
fi

Expand Down

0 comments on commit 6d024a3

Please sign in to comment.