"examples/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "a9b38db2d9714b4a707de65f5b13632db821c6eb"
Unverified Commit 0bdd01a7 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Remove usage of torch._six (#7243)

parent d4575e5b
...@@ -451,7 +451,7 @@ def verify_str_arg( ...@@ -451,7 +451,7 @@ def verify_str_arg(
valid_values: Optional[Iterable[T]] = None, valid_values: Optional[Iterable[T]] = None,
custom_msg: Optional[str] = None, custom_msg: Optional[str] = None,
) -> T: ) -> T:
if not isinstance(value, torch._six.string_classes): if not isinstance(value, str):
if arg is None: if arg is None:
msg = "Expected type str, but got type {type}." msg = "Expected type str, but got type {type}."
else: else:
......
...@@ -36,7 +36,7 @@ class VisionDataset(data.Dataset): ...@@ -36,7 +36,7 @@ class VisionDataset(data.Dataset):
target_transform: Optional[Callable] = None, target_transform: Optional[Callable] = None,
) -> None: ) -> None:
_log_api_usage_once(self) _log_api_usage_once(self)
if isinstance(root, torch._six.string_classes): if isinstance(root, str):
root = os.path.expanduser(root) root = os.path.expanduser(root)
self.root = root self.root = root
......
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