Skip to content

Commit

Permalink
Downgrade bolt_on warning message from printing a message to just a c…
Browse files Browse the repository at this point in the history
…ode 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
  • Loading branch information
swegner authored and tensorflower-gardener committed Oct 11, 2019
1 parent 6c03ce4 commit c0e05f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion privacy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@
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

0 comments on commit c0e05f6

Please sign in to comment.