mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Fix small type hinting error (#7820)
* Fix small type hinting error * Update tokenization_utils_base.py * Update src/transformers/tokenization_utils_base.py Co-authored-by: Lysandre Debut <lysandre@huggingface.co> Co-authored-by: Lysandre Debut <lysandre@huggingface.co>
This commit is contained in:
parent
b86a71ea38
commit
406a49dfe4
@ -602,7 +602,7 @@ class BatchEncoding(UserDict):
|
||||
return self
|
||||
|
||||
@torch_required
|
||||
def to(self, device: str) -> "BatchEncoding":
|
||||
def to(self, device: Union[str, "torch.device"]) -> "BatchEncoding":
|
||||
"""
|
||||
Send all values to device by calling :obj:`v.to(device)` (PyTorch only).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user