Skip to content

Commit 3c80207

Browse files
superbobrycopybara-github
authored andcommitted
Ignore pytype errors produced with --use-functools-partial-overlay
PiperOrigin-RevId: 828850504
1 parent df5d3fa commit 3c80207

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

baselines/jft/vmoe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def load_checkpoint(config, mesh, efficient_ensemble_size):
8181
restore_checkpoint = functools.partial(
8282
partitioned.restore_checkpoint, tree=None, axis_resources=None)
8383
with mesh:
84-
params = {p: restore_checkpoint(prefix=p) for p in model_init}
84+
params = {p: restore_checkpoint(prefix=p) for p in model_init} # pytype: disable=wrong-keyword-args
8585
return flax.core.freeze(params)
8686

8787

baselines/t5/data/tasks/toxic_comments.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ def _register_toxic_comments_classification_task(
142142
toxicity_label_threshold=TOXIC_LABEL_THRESHOLD)
143143

144144
# Training data.
145-
_register_toxic_comments_task(
145+
_register_toxic_comments_task( # pytype: disable=wrong-arg-types
146146
task_name='wikipedia_talk',
147147
tfds_name='wikipedia_toxicity_subtypes:0.3.1',
148148
tfds_splits=('train',),
149149
)
150150

151151
# In-domain evaluation data. Note we will use test split for validation since
152152
# wikipedia_talk data does not have a validation split.
153-
_register_toxic_comments_task(
153+
_register_toxic_comments_task( # pytype: disable=wrong-arg-types
154154
task_name='wikipedia_talk_eval_only',
155155
tfds_name='wikipedia_toxicity_subtypes:0.3.1',
156156
tfds_splits={
@@ -160,15 +160,15 @@ def _register_toxic_comments_classification_task(
160160
)
161161

162162
# Out-of-domain evaluation data.
163-
_register_toxic_comments_task(
163+
_register_toxic_comments_task( # pytype: disable=wrong-arg-types
164164
task_name='civil_comments_eval_only',
165165
tfds_name='civil_comments/CivilComments:1.1.2',
166166
tfds_splits=('validation', 'test'),
167167
)
168168

169169
# Spurious correlation / tail generalization evaluation data, i.e., comments
170170
# with mentions of sensitive social / racial attributes.
171-
_register_toxic_comments_task(
171+
_register_toxic_comments_task( # pytype: disable=wrong-arg-types
172172
task_name='civil_comments_identity_eval_only',
173173
tfds_name='civil_comments/CivilCommentsIdentities:1.1.2',
174174
tfds_splits=('validation', 'test'),
@@ -178,7 +178,7 @@ def _register_toxic_comments_classification_task(
178178
# contains different types of covert offensiveness (e.g., microaggression,
179179
# sarcasim, emoticons, etc).
180180
# Note this data only has positive label and does not have a validation split.
181-
_register_toxic_comments_task(
181+
_register_toxic_comments_task( # pytype: disable=wrong-arg-types
182182
task_name='civil_comments_covert_eval_only',
183183
tfds_name='civil_comments/CivilCommentsCovert:1.1.2',
184184
tfds_splits={'validation': 'test'},

0 commit comments

Comments
 (0)