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
This commit is contained in:
parent
6c03ce49fd
commit
c0e05f6cad
1 changed files with 2 additions and 1 deletions
|
@ -53,4 +53,5 @@ else:
|
||||||
from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy
|
from privacy.bolt_on.losses import StrongConvexBinaryCrossentropy
|
||||||
from privacy.bolt_on.losses import StrongConvexHuber
|
from privacy.bolt_on.losses import StrongConvexHuber
|
||||||
except ImportError:
|
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
|
||||||
|
|
Loading…
Reference in a new issue