Skip to content

Commit 8b12ae2

Browse files
oprypintensorflower-gardener
authored andcommitted
Suppress new Pyrefly findings before upgrading to v1.2.0
PiperOrigin-RevId: 979359023
1 parent d598fb8 commit 8b12ae2

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎official/nlp/modeling/networks/encoder_scaffold.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def __init__(self,
134134
**embedding_cfg) if embedding_cfg else embedding_cls()
135135
else:
136136
embedding_network = embedding_cls
137-
inputs = embedding_network.inputs
138-
embeddings, attention_mask = embedding_network(inputs)
137+
inputs = embedding_network.inputs # pyrefly: ignore[missing-attribute]
138+
embeddings, attention_mask = embedding_network(inputs) # pyrefly: ignore[not-callable]
139139
embedding_layer = None
140140
position_embedding_layer = None
141141
type_embedding_layer = None
@@ -193,7 +193,7 @@ def __init__(self,
193193
mask_layer = mask_cls(**mask_cfg)
194194
else:
195195
mask_layer = mask_cls
196-
attention_mask = mask_layer(embeddings, mask)
196+
attention_mask = mask_layer(embeddings, mask) # pyrefly: ignore[not-callable]
197197

198198
data = embeddings
199199

@@ -225,9 +225,9 @@ def __init__(self,
225225
else:
226226
layer = cur_hidden_cls
227227
if recursive:
228-
data, recursive_states = layer([data, attention_mask, recursive_states])
228+
data, recursive_states = layer([data, attention_mask, recursive_states]) # pyrefly: ignore[not-callable]
229229
else:
230-
data = layer([data, attention_mask])
230+
data = layer([data, attention_mask]) # pyrefly: ignore[not-callable]
231231
layer_output_data.append(data)
232232
hidden_layers.append(layer)
233233

‎official/projects/assemblenet/modeling/assemblenet.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def build_assemblenet_v1(
10331033
backbone_cfg.blocks)
10341034
params = ASSEMBLENET_SPECS[assemblenet_depth]
10351035
block_fn = functools.partial(
1036-
params['block'], # pyrefly: ignore[bad-argument-type]
1036+
params['block'], # pyrefly: ignore[bad-argument-type, not-callable]
10371037
use_sync_bn=norm_activation_config.use_sync_bn,
10381038
bn_decay=norm_activation_config.norm_momentum,
10391039
bn_epsilon=norm_activation_config.norm_epsilon)

‎official/projects/edgetpu/vision/modeling/custom_layers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def __init__(self,
127127
if self.use_batch_norm:
128128
self.batch_norm_layer = [
129129
batch_norm_layer( # pyrefly: ignore[not-callable]
130-
axis=-1, momentum=self.bn_momentum, epsilon=self.bn_epsilon)
130+
axis=-1, momentum=self.bn_momentum, epsilon=self.bn_epsilon) # pyrefly: ignore[unexpected-keyword]
131131
for i in range(self._groups)
132132
]
133133

‎official/vision/serving/export_tflite_lib.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def convert_tflite_model(
141141
representative_dataset,
142142
params=params,
143143
task=task,
144-
calibration_steps=calibration_steps)
144+
calibration_steps=calibration_steps) # pyrefly: ignore[bad-argument-type]
145145
if quant_type.startswith('int8_full'):
146146
converter.target_spec.supported_ops = [
147147
tf.lite.OpsSet.TFLITE_BUILTINS_INT8
@@ -161,7 +161,7 @@ def convert_tflite_model(
161161
debug_dataset=functools.partial(
162162
representative_dataset,
163163
params=params,
164-
calibration_steps=calibration_steps),
164+
calibration_steps=calibration_steps), # pyrefly: ignore[bad-argument-type]
165165
debug_options=debug_options)
166166
debugger.run()
167167
return debugger.get_nondebug_quantized_model()

0 commit comments

Comments
 (0)