From 5341fc117a288d077c69b255df73799e009c75e4 Mon Sep 17 00:00:00 2001 From: Sean Yang Date: Thu, 15 Feb 2024 17:43:50 -0800 Subject: [PATCH] tf setup and teardown for integration tests (#2366) --- examples/nvflare_setup.ipynb | 2 +- .../test_configs/standalone_job/hello_tf_examples.yml | 8 ++++++++ .../data/test_configs/standalone_job/internal_tf.yml | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/examples/nvflare_setup.ipynb b/examples/nvflare_setup.ipynb index eede563c67..c911037cca 100644 --- a/examples/nvflare_setup.ipynb +++ b/examples/nvflare_setup.ipynb @@ -23,7 +23,7 @@ "source": [ "### Install NVFLARE from PyPI\n", "```\n", - "pip install 'nvflare>=2.3.0'\n", + "pip install 'nvflare~=2.4.0'\n", "\n", "```\n", "We do not recommend running NVFlare CLI commands in jupyter notebook cells." diff --git a/tests/integration_test/data/test_configs/standalone_job/hello_tf_examples.yml b/tests/integration_test/data/test_configs/standalone_job/hello_tf_examples.yml index 7f104c77b0..39b1a59c3b 100644 --- a/tests/integration_test/data/test_configs/standalone_job/hello_tf_examples.yml +++ b/tests/integration_test/data/test_configs/standalone_job/hello_tf_examples.yml @@ -22,6 +22,10 @@ tests: "data": { "run_finished": True } validators: - path: tests.integration_test.src.validators.TFModelValidator + setup: + - python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()" + teardown: + - rm ~/.keras/datasets/mnist.npz - test_name: "run hello-tf2" event_sequence: - "trigger": @@ -39,3 +43,7 @@ tests: "data": { "run_finished": True } validators: - path: tests.integration_test.src.validators.TFModelValidator + setup: + - python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()" + teardown: + - rm ~/.keras/datasets/mnist.npz diff --git a/tests/integration_test/data/test_configs/standalone_job/internal_tf.yml b/tests/integration_test/data/test_configs/standalone_job/internal_tf.yml index 5dbee25399..59daaf8dbe 100644 --- a/tests/integration_test/data/test_configs/standalone_job/internal_tf.yml +++ b/tests/integration_test/data/test_configs/standalone_job/internal_tf.yml @@ -24,3 +24,5 @@ tests: - path: tests.integration_test.src.validators.TFModelValidator setup: - python -c "import tensorflow as tf; tf.keras.datasets.mnist.load_data()" + teardown: + - rm ~/.keras/datasets/mnist.npz