"docs/git@developer.sourcefind.cn:OpenDAS/nni.git" did not exist on "0ee69f82216c9bf52dca1a4e397f1170aa708d51"
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): ...@@ -602,7 +602,7 @@ class BatchEncoding(UserDict):
return self return self
@torch_required @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). 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