Skip to content

Commit 8317ad3

Browse files
leeyy2020ZeyuChen
andauthored
Delete the batchify_fn of cluewsc (#889)
Co-authored-by: Zeyu Chen <[email protected]>
1 parent 14efb91 commit 8317ad3

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

examples/few_shot/pet/pet.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -100,19 +100,6 @@ def do_train(args):
100100
Stack(dtype="int64"), # masked_positions
101101
Stack(dtype="int64"), # candidate_labels_ids [candidate_num, label_length]
102102
): [data for data in fn(samples)]
103-
elif args.task_name == "cluewsc":
104-
batchify_fn = lambda samples, fn=Tuple(
105-
Pad(axis=0, pad_val=tokenizer.pad_token_id), # src_ids
106-
Pad(axis=0, pad_val=tokenizer.pad_token_type_id), # token_type_ids
107-
Stack(dtype="int64"), # masked_positions
108-
Stack(dtype="int64"), # masked_lm_labels
109-
): [data for data in fn(samples)]
110-
batchify_test_fn = lambda samples, fn=Tuple(
111-
Pad(axis=0, pad_val=tokenizer.pad_token_id), # src_ids
112-
Pad(axis=0, pad_val=tokenizer.pad_token_type_id), # token_type_ids
113-
Stack(dtype="int64"), # masked_positions
114-
Stack(dtype="int64"), # masked_positions
115-
): [data for data in fn(samples)]
116103
else:
117104
# [src_ids, token_type_ids, masked_positions, masked_lm_labels]
118105
batchify_fn = lambda samples, fn=Tuple(

0 commit comments

Comments
 (0)