From ec885ef0ced64c3bbb343411188322682068318d Mon Sep 17 00:00:00 2001 From: Lingvo Maintenance Date: Wed, 9 Oct 2024 13:25:32 -0700 Subject: [PATCH] Use `tf.logging` instead of `absl.logging` for consistency. PiperOrigin-RevId: 684150815 --- lingvo/core/attention.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lingvo/core/attention.py b/lingvo/core/attention.py index 1b6b7874d..09f2056d4 100644 --- a/lingvo/core/attention.py +++ b/lingvo/core/attention.py @@ -17,7 +17,6 @@ import math from typing import Optional, Tuple -from absl import logging import lingvo.compat as tf from lingvo.core import base_layer from lingvo.core import gshard_utils @@ -550,11 +549,11 @@ def AttenProbs(inputs: py_utils.NestedMap) -> tf.Tensor: ) else: if hasattr(inputs, 'source_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but source_segment_id is passed.' ) if hasattr(inputs, 'query_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but query_segment_id is passed.' ) # Reshape logits to a matrix of shape [target_batch, source_length] and @@ -715,11 +714,11 @@ def AttenProbs(inputs: py_utils.NestedMap) -> tf.Tensor: source_padding = tf.squeeze(source_padding, 1) else: if hasattr(inputs, 'source_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but source_segment_id is passed.' ) if hasattr(inputs, 'query_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but query_segment_id is passed.' ) # [b, sl] @@ -1067,11 +1066,11 @@ def AttenProbs( source_padding = tf.transpose(source_padding, [1, 2, 0]) else: if hasattr(inputs, 'source_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but source_segment_id is passed.' ) if hasattr(inputs, 'query_segment_id'): - logging.warning( + tf.logging.warning( 'packed_input is False but query_segment_id is passed.' ) source_padding = tf.transpose(source_padding, [2, 0, 1])