Unverified Commit 406a49df authored by AndreaSottana's avatar AndreaSottana Committed by GitHub
Browse files

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: default avatarLysandre Debut <lysandre@huggingface.co>
Co-authored-by: default avatarLysandre Debut <lysandre@huggingface.co>
parent b86a71ea
......@@ -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).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment