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

Deprecate num_proc parameter in DownloadManager.extract #5142

Merged
merged 5 commits into from
Oct 25, 2022
Merged
Changes from 1 commit
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
6 changes: 4 additions & 2 deletions src/datasets/download/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def iter_files(self, paths: Union[str, List[str]]):
"""
return FilesIterable.from_paths(paths)

def extract(self, path_or_paths, num_proc=None):
def extract(self, path_or_paths):
mariosasko marked this conversation as resolved.
Show resolved Hide resolved
"""Extract given path(s).

Args:
Expand All @@ -402,10 +402,12 @@ def extract(self, path_or_paths, num_proc=None):
# Extract downloads the file first if it is not already downloaded
if download_config.download_desc is None:
download_config.download_desc = "Downloading data"
if download_config.num_proc is None:
download_config.num_proc = 16
extracted_paths = map_nested(
partial(cached_path, download_config=download_config),
path_or_paths,
num_proc=num_proc,
num_proc=download_config.num_proc,
disable_tqdm=not is_progress_bar_enabled(),
desc="Extracting data files",
)
Expand Down