From 7946765779e4d95440e142f497b48fc2397a031c Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 14:17:56 -0230 Subject: [PATCH 1/7] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index 2599cd1652..ab74745ab2 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -29,6 +29,8 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then elif [[ "$OS" = "Darwin" ]]; then # MacOS uses Python 3.11 and PyTorch does not yet support Python 3.11. For now, # install the specific versions we've requested on MacOS. + # There is an error when trying to upgrade 3.11 that it cannot create this symlink because it already exists. Remove for now. + rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} brew install python@${OS_PYTHON_VERSION} brew link --force python@${OS_PYTHON_VERSION} fi From 94bff0571f0037a384e9086dd6edbffba26321aa Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 14:22:30 -0230 Subject: [PATCH 2/7] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index ab74745ab2..bfd64e8b7b 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -29,9 +29,8 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then elif [[ "$OS" = "Darwin" ]]; then # MacOS uses Python 3.11 and PyTorch does not yet support Python 3.11. For now, # install the specific versions we've requested on MacOS. - # There is an error when trying to upgrade 3.11 that it cannot create this symlink because it already exists. Remove for now. - rm -f /usr/local/bin/2to3-${OS_PYTHON_VERSION} - brew install python@${OS_PYTHON_VERSION} + # The auto-update runs into a problem with symlinking on Python 3.11. + HOMEBREW_NO_AUTO_UPDATE=1 brew install python@${OS_PYTHON_VERSION} brew link --force python@${OS_PYTHON_VERSION} fi From 7a9e2b764229607a39d6148cb8abd8a604fe561e Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 14:28:10 -0230 Subject: [PATCH 3/7] Update install.sh --- open_spiel/scripts/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index df161a8606..fe50bf5742 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -288,7 +288,8 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # On Github Actions, macOS comes with Python 3.9. # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" && "${OS_PYTHON_VERSION}" != "3.9" ]]; then - brew install "python@${OS_PYTHON_VERSION}" + # Auto-update is causing failures on Github Actions, so disable them. + HOMEBREW_NO_AUTO_UPDATE=1 brew install "python@${OS_PYTHON_VERSION}" # Uninstall Python 3.9 if we need to. brew list python@3.9 && brew unlink python@3.9 brew link --force --overwrite "python@${OS_PYTHON_VERSION}" From dba1e256f8ffc96474e6e6dbd299cfeff15b091e Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 14:49:12 -0230 Subject: [PATCH 4/7] Update install.sh --- open_spiel/scripts/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index fe50bf5742..832dc97aa8 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -288,8 +288,10 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX # On Github Actions, macOS comes with Python 3.9. # We want to test multiple Python versions determined by OS_PYTHON_VERSION. if [[ "$CI" && "${OS_PYTHON_VERSION}" != "3.9" ]]; then - # Auto-update is causing failures on Github Actions, so disable them. - HOMEBREW_NO_AUTO_UPDATE=1 brew install "python@${OS_PYTHON_VERSION}" + # Only install the python version if it's not present. There are issues otherwise. + if [[ `brew list python@${OS_PYTHON_VERSION}; echo $?` == 0 ]]; then + brew install "python@${OS_PYTHON_VERSION}" + fi # Uninstall Python 3.9 if we need to. brew list python@3.9 && brew unlink python@3.9 brew link --force --overwrite "python@${OS_PYTHON_VERSION}" From 7d9ef7f15b726ee25faca6ebf504aef1323fb1d7 Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 14:52:47 -0230 Subject: [PATCH 5/7] Update install.sh --- open_spiel/scripts/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/open_spiel/scripts/install.sh b/open_spiel/scripts/install.sh index 832dc97aa8..24d72a1f91 100755 --- a/open_spiel/scripts/install.sh +++ b/open_spiel/scripts/install.sh @@ -287,13 +287,12 @@ elif [[ "$OSTYPE" == "darwin"* ]]; then # Mac OSX [[ -x `which python3` ]] || brew install python3 || echo "** Warning: failed 'brew install python3' -- continuing" # On Github Actions, macOS comes with Python 3.9. # We want to test multiple Python versions determined by OS_PYTHON_VERSION. - if [[ "$CI" && "${OS_PYTHON_VERSION}" != "3.9" ]]; then + if [[ "$CI" ]]; then # Only install the python version if it's not present. There are issues otherwise. if [[ `brew list python@${OS_PYTHON_VERSION}; echo $?` == 0 ]]; then brew install "python@${OS_PYTHON_VERSION}" fi # Uninstall Python 3.9 if we need to. - brew list python@3.9 && brew unlink python@3.9 brew link --force --overwrite "python@${OS_PYTHON_VERSION}" fi `python3 -c "import tkinter" > /dev/null 2>&1` || brew install tcl-tk || echo "** Warning: failed 'brew install tcl-tk' -- continuing" From cb2de2f9d0d266ac21d70a3f7529ba3445cfd94e Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 15:01:16 -0230 Subject: [PATCH 6/7] Update ci_script.sh --- open_spiel/scripts/ci_script.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/open_spiel/scripts/ci_script.sh b/open_spiel/scripts/ci_script.sh index bfd64e8b7b..fa33d68b3e 100755 --- a/open_spiel/scripts/ci_script.sh +++ b/open_spiel/scripts/ci_script.sh @@ -27,10 +27,7 @@ if [[ "$OS" = "Linux" && "$OS_PYTHON_VERSION" = "3.9" ]]; then # Still needed to support using venv on Ubuntu 20.04: sudo apt-get install python3.9-venv elif [[ "$OS" = "Darwin" ]]; then - # MacOS uses Python 3.11 and PyTorch does not yet support Python 3.11. For now, - # install the specific versions we've requested on MacOS. - # The auto-update runs into a problem with symlinking on Python 3.11. - HOMEBREW_NO_AUTO_UPDATE=1 brew install python@${OS_PYTHON_VERSION} + # Python is already intalled via brew in install.sh from actions.yml brew link --force python@${OS_PYTHON_VERSION} fi From 24788096443092d0eb57da31ec79a58f05aa9951 Mon Sep 17 00:00:00 2001 From: lanctot Date: Tue, 16 Jul 2024 15:14:34 -0230 Subject: [PATCH 7/7] Update uci_bot.h --- open_spiel/bots/uci/uci_bot.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open_spiel/bots/uci/uci_bot.h b/open_spiel/bots/uci/uci_bot.h index ba01e09aef..764e3ebba2 100644 --- a/open_spiel/bots/uci/uci_bot.h +++ b/open_spiel/bots/uci/uci_bot.h @@ -15,6 +15,7 @@ #ifndef OPEN_SPIEL_BOTS_UCI_BOT_H_ #define OPEN_SPIEL_BOTS_UCI_BOT_H_ +#include // for size_t, needed by ::getline #include #include #include @@ -97,7 +98,7 @@ class UCIBot : public Bot { // Input stream member variables for the bot. FILE* input_stream_ = nullptr; char* input_stream_buffer_ = nullptr; - uint64_t input_stream_buffer_size_ = 0; + size_t input_stream_buffer_size_ = 0; }; /**