From c0e05f6cad069059af6742d80c1c52e53798d079 Mon Sep 17 00:00:00 2001 From: Scott Wegner Date: Fri, 11 Oct 2019 10:21:19 -0700 Subject: [PATCH] Downgrade bolt_on warning message from printing a message to just a code comment. As is, this will be printed on every python execution which imports tf_privacy where this module is not available (including transitive dependencies, i.e. via tf_federated). The warning is not actionable for users and so is strictly noise. Worse, because this uses print() rather than logging, this is often the last line of output when running unit tests. It's easy to mistakenly think that a unit test failure was caused by this warning. This change removes the log statement entirely, since it is noisy and not actionable. PiperOrigin-RevId: 274198105 --- privacy/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/privacy/__init__.py b/privacy/__init__.py index f530a11..2d93214 100644 --- a/privacy/__init__.py +++ b/privacy/__init__.py @@ -53,4 +53,5 @@ else: from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy from privacy.bolt_on.losses import StrongConvexHuber except ImportError: - print('module `bolt_on` was not found in this version of TF Privacy') + # module `bolt_on` not yet available in this version of TF Privacy + pass