Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhui Dih Lee authored and Rhui Dih Lee committed Jun 26, 2024
1 parent 7d45ef1 commit cf6271f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
"DataCollatorForTokenClassification",
"DataCollatorForWholeWordMask",
"DataCollatorWithPadding",
"DataCollatorWithFlattening",
"DefaultDataCollator",
"default_data_collator",
],
Expand Down Expand Up @@ -4692,6 +4693,7 @@
DataCollatorForTokenClassification,
DataCollatorForWholeWordMask,
DataCollatorWithPadding,
DataCollatorWithFlattening,
DefaultDataCollator,
default_data_collator,
)
Expand Down
1 change: 1 addition & 0 deletions src/transformers/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
DataCollatorForTokenClassification,
DataCollatorForWholeWordMask,
DataCollatorWithPadding,
DataCollatorWithFlattening,
DefaultDataCollator,
default_data_collator,
)
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/data/data_collator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ def numpy_mask_tokens(self, inputs: Any) -> Tuple[Any, Any, Any, Any]:
return inputs.astype(np.int64), perm_mask, target_mapping, labels.astype(np.int64)

@dataclass
class DataCollatorBatchFlattening(DefaultDataCollator):
class DataCollatorWithFlattening(DefaultDataCollator):
return_tensors: str = "pt"
def __init__(self, return_position_ids=True):
self.return_position_ids=return_position_ids
Expand Down

0 comments on commit cf6271f

Please sign in to comment.