From cccb7a2a544e8813e01c202f012c6fdb6130c7b2 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 3 Dec 2020 00:20:34 -0800 Subject: [PATCH 1/6] debug Signed-off-by: Richard Liaw --- ci/travis/install-dependencies.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 681168245b9f..543391bce5b3 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -314,7 +314,9 @@ install_dependencies() { 1.5) TORCHVISION_VERSION=0.6.0;; *) TORCHVISION_VERSION=0.5.0;; esac - + which -a pip + pip --version + pip install --help pip install --use-deprecated=legacy-resolver --upgrade tensorflow-probability=="${TFP_VERSION-0.8}" \ torch=="${TORCH_VERSION-1.6}" torchvision=="${TORCHVISION_VERSION}" \ tensorflow=="${TF_VERSION-2.2.0}" gym From 0cef830e4180a66482b246010cd9e8c550354e94 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 3 Dec 2020 00:49:51 -0800 Subject: [PATCH 2/6] update-pip Signed-off-by: Richard Liaw --- ci/travis/install-dependencies.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 543391bce5b3..2747ac41b4ff 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -192,7 +192,7 @@ install_nvm() { fi } -install_pip() { +install_upgrade_pip() { local python=python if command -v python3 > /dev/null; then python=python3 @@ -237,10 +237,11 @@ install_dependencies() { install_base install_toolchains install_nvm - install_pip + install_upgrade_pip if [ -n "${PYTHON-}" ] || [ "${LINT-}" = 1 ]; then install_miniconda + install_upgrade_pip fi # Install modules needed in all jobs. @@ -314,9 +315,6 @@ install_dependencies() { 1.5) TORCHVISION_VERSION=0.6.0;; *) TORCHVISION_VERSION=0.5.0;; esac - which -a pip - pip --version - pip install --help pip install --use-deprecated=legacy-resolver --upgrade tensorflow-probability=="${TFP_VERSION-0.8}" \ torch=="${TORCH_VERSION-1.6}" torchvision=="${TORCHVISION_VERSION}" \ tensorflow=="${TF_VERSION-2.2.0}" gym From 39aacae772ba46c2f2625b81b1ff8c1e34c95442 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 3 Dec 2020 10:38:22 -0800 Subject: [PATCH 3/6] Update ci/travis/install-dependencies.sh --- ci/travis/install-dependencies.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 2747ac41b4ff..0602f7454564 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -241,6 +241,7 @@ install_dependencies() { if [ -n "${PYTHON-}" ] || [ "${LINT-}" = 1 ]; then install_miniconda + # Upgrade the miniconda pip. install_upgrade_pip fi From 798a6325c86b736141352bd062ee77f24a3595f9 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 3 Dec 2020 13:13:07 -0800 Subject: [PATCH 4/6] comment Signed-off-by: Richard Liaw --- ci/travis/install-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 2747ac41b4ff..cb6ab2288561 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -206,7 +206,7 @@ install_upgrade_pip() { "${python}" -W ignore -m pip config -q --user set global.disable-pip-version-check True "${python}" -W ignore -m pip config -q --user set global.no-color True "${python}" -W ignore -m pip config -q --user set global.progress_bar off - "${python}" -W ignore -m pip config -q --user set global.quiet True + # "${python}" -W ignore -m pip config -q --user set global.quiet True fi fi } From 9e557e8537398a50c90d230725ae98338fb839dc Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Thu, 3 Dec 2020 13:32:48 -0800 Subject: [PATCH 5/6] legaci Signed-off-by: Richard Liaw --- ci/travis/install-dependencies.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/travis/install-dependencies.sh b/ci/travis/install-dependencies.sh index 3080417c8c36..d11ba586716b 100755 --- a/ci/travis/install-dependencies.sh +++ b/ci/travis/install-dependencies.sh @@ -206,7 +206,7 @@ install_upgrade_pip() { "${python}" -W ignore -m pip config -q --user set global.disable-pip-version-check True "${python}" -W ignore -m pip config -q --user set global.no-color True "${python}" -W ignore -m pip config -q --user set global.progress_bar off - # "${python}" -W ignore -m pip config -q --user set global.quiet True + "${python}" -W ignore -m pip config -q --user set global.quiet True fi fi } @@ -280,8 +280,8 @@ install_dependencies() { if [ "${OSTYPE}" = msys ] && [ "${python_version}" = "3.8" ]; then { echo "WARNING: Pillow binaries not available on Windows; cannot build docs"; } 2> /dev/null else - pip install -r "${WORKSPACE_DIR}"/doc/requirements-rtd.txt - pip install -r "${WORKSPACE_DIR}"/doc/requirements-doc.txt + pip install --use-deprecated=legacy-resolver -r "${WORKSPACE_DIR}"/doc/requirements-rtd.txt + pip install --use-deprecated=legacy-resolver -r "${WORKSPACE_DIR}"/doc/requirements-doc.txt fi fi From 8e7086c44f67d54c36d06a7cb8e2d964693014e9 Mon Sep 17 00:00:00 2001 From: Richard Liaw Date: Sat, 12 Dec 2020 01:32:15 -0800 Subject: [PATCH 6/6] fix-build Signed-off-by: Richard Liaw --- python/ray/util/sgd/torch/examples/dcgan.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ray/util/sgd/torch/examples/dcgan.py b/python/ray/util/sgd/torch/examples/dcgan.py index 9bbf34f4180d..936272be2502 100644 --- a/python/ray/util/sgd/torch/examples/dcgan.py +++ b/python/ray/util/sgd/torch/examples/dcgan.py @@ -182,8 +182,8 @@ def get_pred(x): @override(TrainingOperator) def train_batch(self, batch, batch_info): """Trains on one batch of data from the data creator.""" - real_label = 1 - fake_label = 0 + real_label = 1.0 + fake_label = 0. discriminator, generator = self.models optimD, optimG = self.optimizers