[tune] revert all mnist tests (#14677)

This reverts commit 3f557348a2.
This commit is contained in:
Richard Liaw 2021-03-14 23:58:13 -07:00 committed by GitHub
parent 3bdcca7ee5
commit c2aeccaf14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 148 additions and 143 deletions

View file

@ -283,7 +283,7 @@ install_dependencies() {
local torch_url="https://download.pytorch.org/whl/torch_stable.html" local torch_url="https://download.pytorch.org/whl/torch_stable.html"
case "${OSTYPE}" in case "${OSTYPE}" in
darwin*) pip install torch torchvision;; darwin*) pip install torch torchvision;;
*) pip install torch==1.8.0+cpu torchvision==0.9.0+cpu -f "${torch_url}";; *) pip install torch==1.7.0+cpu torchvision==0.8.1+cpu -f "${torch_url}";;
esac esac
fi fi
@ -337,13 +337,13 @@ install_dependencies() {
# If CI has deemed that a different version of Tensorflow or Torch # If CI has deemed that a different version of Tensorflow or Torch
# should be installed, then upgrade/downgrade to that specific version. # should be installed, then upgrade/downgrade to that specific version.
if [ -n "${TORCH_VERSION-}" ] || [ -n "${TFP_VERSION-}" ] || [ -n "${TF_VERSION-}" ]; then if [ -n "${TORCH_VERSION-}" ] || [ -n "${TFP_VERSION-}" ] || [ -n "${TF_VERSION-}" ]; then
case "${TORCH_VERSION-1.8}" in case "${TORCH_VERSION-1.7}" in
1.8) TORCHVISION_VERSION=0.9.0;; 1.7) TORCHVISION_VERSION=0.8.1;;
1.5) TORCHVISION_VERSION=0.6.0;; 1.5) TORCHVISION_VERSION=0.6.0;;
*) TORCHVISION_VERSION=0.5.0;; *) TORCHVISION_VERSION=0.5.0;;
esac esac
pip install --use-deprecated=legacy-resolver --upgrade tensorflow-probability=="${TFP_VERSION-0.8}" \ pip install --use-deprecated=legacy-resolver --upgrade tensorflow-probability=="${TFP_VERSION-0.8}" \
torch=="${TORCH_VERSION-1.8}" torchvision=="${TORCHVISION_VERSION}" \ torch=="${TORCH_VERSION-1.7}" torchvision=="${TORCHVISION_VERSION}" \
tensorflow=="${TF_VERSION-2.2.0}" gym tensorflow=="${TF_VERSION-2.2.0}" gym
fi fi
fi fi

View file

@ -3,19 +3,19 @@
# Please keep these sorted alphabetically, but start with the # Please keep these sorted alphabetically, but start with the
# root directory. # root directory.
# -------------------------------------------------------------------- # --------------------------------------------------------------------
py_test( # py_test(
name = "plot_hyperparameter", # name = "plot_hyperparameter",
size = "small", # size = "small",
srcs = ["examples/plot_hyperparameter.py"], # srcs = ["examples/plot_hyperparameter.py"],
tags = ["exclusive"] # tags = ["exclusive"]
) # )
py_test( # py_test(
name = "plot_parameter_server", # name = "plot_parameter_server",
size = "medium", # size = "medium",
srcs = ["examples/plot_parameter_server.py"], # srcs = ["examples/plot_parameter_server.py"],
tags = ["exclusive"] # tags = ["exclusive"]
) # )
py_test( py_test(
name = "plot_pong_example", name = "plot_pong_example",
@ -63,11 +63,11 @@ py_test(
args = ["--smoke-test"] args = ["--smoke-test"]
) )
py_test( # py_test(
name = "tune_serve_integration_mnist", # name = "tune_serve_integration_mnist",
size = "medium", # size = "medium",
main = "source/tune/_tutorials/tune-serve-integration-mnist.py", # main = "source/tune/_tutorials/tune-serve-integration-mnist.py",
srcs = ["source/tune/_tutorials/tune-serve-integration-mnist.py"], # srcs = ["source/tune/_tutorials/tune-serve-integration-mnist.py"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
args = ["--smoke-test", "--from_scratch", "--day 0"] # args = ["--smoke-test", "--from_scratch", "--day 0"]
) # )

View file

@ -7,6 +7,11 @@ but we put comments right after code blocks to prevent large white spaces
in the documentation. in the documentation.
""" """
# yapf: disable # yapf: disable
if __name__ == "__main__":
# temporarily disable due to mnist outage
import sys
sys.exit(0)
# __torch_model_start__ # __torch_model_start__
import torch import torch
import torch.nn as nn import torch.nn as nn

View file

@ -319,13 +319,13 @@ py_test(
) )
# Todo: Ensure MPLBACKEND=Agg # Todo: Ensure MPLBACKEND=Agg
py_test( # py_test(
name = "tutorial", # name = "tutorial",
size = "medium", # size = "medium",
srcs = ["tests/tutorial.py"], # srcs = ["tests/tutorial.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
) # )
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Examples from the python/ray/tune/examples directory. # Examples from the python/ray/tune/examples directory.
@ -399,14 +399,14 @@ py_test(
deps = [":tune_lib"], deps = [":tune_lib"],
) )
py_test( # py_test(
name = "ddp_mnist_torch", # name = "ddp_mnist_torch",
size = "small", # size = "small",
srcs = ["examples/ddp_mnist_torch.py"], # srcs = ["examples/ddp_mnist_torch.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "pytorch"], # tags = ["exclusive", "example", "pytorch"],
args = ["--num-workers=2"] # args = ["--num-workers=2"]
) # )
py_test( py_test(
name = "tf_distributed_keras_example", name = "tf_distributed_keras_example",
@ -515,50 +515,50 @@ py_test(
tags = ["exclusive", "example"] tags = ["exclusive", "example"]
) )
py_test( # py_test(
name = "mlflow_ptl", # name = "mlflow_ptl",
size = "medium", # size = "medium",
srcs = ["examples/mlflow_ptl.py"], # srcs = ["examples/mlflow_ptl.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "py37", "pytorch"], # tags = ["exclusive", "example", "py37", "pytorch"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "mnist_pytorch", # name = "mnist_pytorch",
size = "small", # size = "small",
srcs = ["examples/mnist_pytorch.py"], # srcs = ["examples/mnist_pytorch.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "pytorch"], # tags = ["exclusive", "example", "pytorch"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "mnist_pytorch_lightning", # name = "mnist_pytorch_lightning",
size = "medium", # size = "medium",
srcs = ["examples/mnist_pytorch_lightning.py"], # srcs = ["examples/mnist_pytorch_lightning.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "pytorch"], # tags = ["exclusive", "example", "pytorch"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "mnist_ptl_mini", # name = "mnist_ptl_mini",
size = "medium", # size = "medium",
srcs = ["examples/mnist_ptl_mini.py"], # srcs = ["examples/mnist_ptl_mini.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "pytorch"], # tags = ["exclusive", "example", "pytorch"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "mnist_pytorch_trainable", # name = "mnist_pytorch_trainable",
size = "small", # size = "small",
srcs = ["examples/mnist_pytorch_trainable.py"], # srcs = ["examples/mnist_pytorch_trainable.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example", "pytorch"], # tags = ["exclusive", "example", "pytorch"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( py_test(
name = "mxnet_example", name = "mxnet_example",
@ -596,41 +596,41 @@ py_test(
args = ["--smoke-test"] args = ["--smoke-test"]
) )
py_test( # py_test(
name = "pbt_convnet_example", # name = "pbt_convnet_example",
size = "small", # size = "small",
srcs = ["examples/pbt_convnet_example.py"], # srcs = ["examples/pbt_convnet_example.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "pbt_convnet_function_example", # name = "pbt_convnet_function_example",
size = "small", # size = "small",
srcs = ["examples/pbt_convnet_function_example.py"], # srcs = ["examples/pbt_convnet_function_example.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "pbt_dcgan_mnist_func", # name = "pbt_dcgan_mnist_func",
size = "medium", # size = "medium",
srcs = ["examples/pbt_dcgan_mnist/pbt_dcgan_mnist_func.py"], # srcs = ["examples/pbt_dcgan_mnist/pbt_dcgan_mnist_func.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( # py_test(
name = "pbt_dcgan_mnist_trainable", # name = "pbt_dcgan_mnist_trainable",
size = "medium", # size = "medium",
srcs = ["examples/pbt_dcgan_mnist/pbt_dcgan_mnist_trainable.py"], # srcs = ["examples/pbt_dcgan_mnist/pbt_dcgan_mnist_trainable.py"],
deps = [":tune_lib"], # deps = [":tune_lib"],
tags = ["exclusive", "example"], # tags = ["exclusive", "example"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
py_test( py_test(
name = "pbt_example", name = "pbt_example",

View file

@ -391,12 +391,12 @@ class TuneExampleTest(unittest.TestCase):
validate_save_restore(Cifar10Model) validate_save_restore(Cifar10Model)
validate_save_restore(Cifar10Model, use_object_store=True) validate_save_restore(Cifar10Model, use_object_store=True)
def testPyTorchMNIST(self): # def testPyTorchMNIST(self):
from ray.tune.examples.mnist_pytorch_trainable import TrainMNIST # from ray.tune.examples.mnist_pytorch_trainable import TrainMNIST
from torchvision import datasets # from torchvision import datasets
datasets.MNIST("~/data", train=True, download=True) # datasets.MNIST("~/data", train=True, download=True)
validate_save_restore(TrainMNIST) # validate_save_restore(TrainMNIST)
validate_save_restore(TrainMNIST, use_object_store=True) # validate_save_restore(TrainMNIST, use_object_store=True)
def testHyperbandExample(self): def testHyperbandExample(self):
from ray.tune.examples.hyperband_example import MyTrainableClass from ray.tune.examples.hyperband_example import MyTrainableClass

View file

@ -16,14 +16,14 @@ py_test(
# Please keep these sorted alphabetically. # Please keep these sorted alphabetically.
# -------------------------------------------------------------------- # --------------------------------------------------------------------
py_test( # py_test(
name = "ptl_horovod_ray_example", # name = "ptl_horovod_ray_example",
size = "medium", # size = "medium",
srcs = ["examples/ptl_horovod_ray_example.py"], # srcs = ["examples/ptl_horovod_ray_example.py"],
tags = ["exclusive", "example", "pytorch-lightning", "pytorch", "horovod"], # tags = ["exclusive", "example", "pytorch-lightning", "pytorch", "horovod"],
deps = [":accelerator_lib"], # deps = [":accelerator_lib"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
# # This is a dummy test dependency that causes the above tests to be # # This is a dummy test dependency that causes the above tests to be
# # re-run if any of these files changes. # # re-run if any of these files changes.

View file

@ -140,14 +140,14 @@ py_test(
args = ["--smoke-test"] args = ["--smoke-test"]
) )
py_test( # py_test(
name = "dcgan", # name = "dcgan",
size = "small", # size = "small",
srcs = ["torch/examples/dcgan.py"], # srcs = ["torch/examples/dcgan.py"],
tags = ["exclusive", "pytorch"], # tags = ["exclusive", "pytorch"],
deps = [":sgd_lib"], # deps = [":sgd_lib"],
args = ["--smoke-test", "--num-workers=2"] # args = ["--smoke-test", "--num-workers=2"]
) # )
py_test( py_test(
name = "raysgd_torch_signatures", name = "raysgd_torch_signatures",
@ -232,14 +232,14 @@ py_test(
args = ["--no-gpu", "--mock-data", "--smoke-test", "--ray-num-workers=2", "--model=mobilenetv3_small_075", "data"] args = ["--no-gpu", "--mock-data", "--smoke-test", "--ray-num-workers=2", "--model=mobilenetv3_small_075", "data"]
) )
py_test( # py_test(
name = "mnist-ptl", # name = "mnist-ptl",
size = "small", # size = "small",
srcs = ["torch/examples/pytorch-lightning/mnist-ptl.py"], # srcs = ["torch/examples/pytorch-lightning/mnist-ptl.py"],
tags = ["exclusive", "pytorch", "pytorch-lightning"], # tags = ["exclusive", "pytorch", "pytorch-lightning"],
deps = [":sgd_lib"], # deps = [":sgd_lib"],
args = ["--smoke-test"] # args = ["--smoke-test"]
) # )
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# SGD related tests from the ../../../../release directory. # SGD related tests from the ../../../../release directory.

View file

@ -36,9 +36,9 @@ torchvision==0.8.2;sys_platform=="darwin"
# On non-OSX machines only install CPU version of torch and torchvision # On non-OSX machines only install CPU version of torch and torchvision
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
torch==1.8.0+cpu;sys_platform!="darwin" torch==1.7.1+cpu;sys_platform!="darwin"
-f https://download.pytorch.org/whl/torch_stable.html -f https://download.pytorch.org/whl/torch_stable.html
torchvision==0.9.0+cpu;sys_platform!="darwin" torchvision==0.8.2+cpu;sys_platform!="darwin"
transformers==4.3.2 transformers==4.3.2