Skip to content

Commit 0bdd01a

Browse files
authored
Remove usage of torch._six (#7243)
1 parent d4575e5 commit 0bdd01a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchvision/datasets/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def verify_str_arg(
451451
valid_values: Optional[Iterable[T]] = None,
452452
custom_msg: Optional[str] = None,
453453
) -> T:
454-
if not isinstance(value, torch._six.string_classes):
454+
if not isinstance(value, str):
455455
if arg is None:
456456
msg = "Expected type str, but got type {type}."
457457
else:

torchvision/datasets/vision.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(
3636
target_transform: Optional[Callable] = None,
3737
) -> None:
3838
_log_api_usage_once(self)
39-
if isinstance(root, torch._six.string_classes):
39+
if isinstance(root, str):
4040
root = os.path.expanduser(root)
4141
self.root = root
4242

0 commit comments

Comments
 (0)