Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use private torch._six #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions ofa/utils/my_dataloader/my_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import torch.multiprocessing as multiprocessing
from torch._utils import ExceptionWrapper
from torch.multiprocessing import Queue as queue
from torch._six import string_classes
from torch.utils.data.dataset import IterableDataset
from torch.utils.data import Sampler, SequentialSampler, RandomSampler, BatchSampler
from torch.utils.data import _utils
Expand Down Expand Up @@ -277,7 +276,7 @@ def multiprocessing_context(self, multiprocessing_context):
"support for different start methods"
)

if isinstance(multiprocessing_context, string_classes):
if isinstance(multiprocessing_context, [str, bytes]):
valid_start_methods = multiprocessing.get_all_start_methods()
if multiprocessing_context not in valid_start_methods:
raise ValueError(
Expand Down