You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2023/02/28 14:52:25 UTC

[beam] branch users/damccorm/tfhub-test updated: Comment

This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch users/damccorm/tfhub-test
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/users/damccorm/tfhub-test by this push:
     new 3473cd4bde9 Comment
3473cd4bde9 is described below

commit 3473cd4bde983330df16317c9b16c65cb2317c46
Author: Danny McCormick <da...@google.com>
AuthorDate: Tue Feb 28 09:52:11 2023 -0500

    Comment
---
 .../apache_beam/ml/inference/tensorflow_inference_it_test.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sdks/python/apache_beam/ml/inference/tensorflow_inference_it_test.py b/sdks/python/apache_beam/ml/inference/tensorflow_inference_it_test.py
index 4e044082ac0..cb2093fe955 100644
--- a/sdks/python/apache_beam/ml/inference/tensorflow_inference_it_test.py
+++ b/sdks/python/apache_beam/ml/inference/tensorflow_inference_it_test.py
@@ -54,12 +54,12 @@ def rmdir(directory):
   directory.rmdir()
 
 def clear_tf_hub_temp_dir(model_path):
-  # When loading a tensorflow hub using tfhub.resolve, the model is saved in a
-  # temporary directory. That file can be persisted between test runs, in which
-  # case tfhub.resolve will no-op. If the model is deleted and the file isn't,
-  # tfhub.resolve will still no-op and tf.keras.models.load_model will throw.
-  # To avoid this (and test more robustly) we delete the temporary directory
-  # entirely between runs.
+  # When loading from tensorflow hub using tfhub.resolve, the model is saved in
+  # a temporary directory. That file can be persisted between test runs, in
+  # which case tfhub.resolve will no-op. If the model is deleted and the file
+  # isn't, tfhub.resolve will still no-op and tf.keras.models.load_model will
+  # throw. To avoid this (and test more robustly) we delete the temporary
+  # directory entirely between runs.
   local_path = hub.resolve(model_path)
   rmdir(local_path)