From 02d62dde1d97c16f81eef2374bb588fed0ae41c7 Mon Sep 17 00:00:00 2001 From: Chongxiao Cao Date: Thu, 24 Feb 2022 22:05:52 -0800 Subject: [PATCH] Skip failed unit tests for TF head, pin lightning to 1.3.8 --- docker-compose.test.yml | 4 ++-- test/parallel/test_tensorflow.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 83121b8a09..ca19223be9 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -95,7 +95,7 @@ services: KERAS_PACKAGE: None PYTORCH_PACKAGE: torch-nightly TORCHVISION_PACKAGE: torchvision - PYTORCH_LIGHTNING_PACKAGE: pytorch_lightning + PYTORCH_LIGHTNING_PACKAGE: pytorch_lightning==1.3.8 MXNET_PACKAGE: mxnet-nightly test-cpu-gloo-py3_7-tf2_7_0-keras2_7_0-torch1_10_1-mxnet1_9_0-pyspark2_4_8: @@ -208,7 +208,7 @@ services: TENSORFLOW_PACKAGE: tf-nightly-gpu KERAS_PACKAGE: None PYTORCH_PACKAGE: torch-nightly-cu111 - PYTORCH_LIGHTNING_PACKAGE: pytorch_lightning + PYTORCH_LIGHTNING_PACKAGE: pytorch_lightning==1.3.8 TORCHVISION_PACKAGE: torchvision MXNET_PACKAGE: mxnet-nightly-cu112 diff --git a/test/parallel/test_tensorflow.py b/test/parallel/test_tensorflow.py index 35963f0d0e..dcfd11c320 100644 --- a/test/parallel/test_tensorflow.py +++ b/test/parallel/test_tensorflow.py @@ -4051,6 +4051,8 @@ def test_horovod_join_allreduce(self): self.assertSequenceEqual(ret_values, [ret] * size, msg="hvd.join() did not return the same value on each rank") + @pytest.mark.skipif(LooseVersion(tf.__version__) >= + LooseVersion('2.9.0'), reason='BatchNormalization object has no attribute apply') def test_horovod_syncbn_gpu(self): """Test that the SyncBatchNormalization implementation is correct on GPU.""" # Only do this test if there are GPUs available. @@ -4098,6 +4100,8 @@ def test_horovod_syncbn_gpu(self): self.assertAllClose(self.evaluate(sync_bn.moving_mean), self.evaluate(bn.moving_mean)) self.assertAllClose(self.evaluate(sync_bn.moving_variance), self.evaluate(bn.moving_variance)) + @pytest.mark.skipif(LooseVersion(tf.__version__) >= + LooseVersion('2.9.0'), reason='BatchNormalization object has no attribute apply') def test_horovod_syncbn_cpu(self): """Test that the SyncBatchNormalization implementation is correct on CPU."""