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

Added new parameter 'compute_key' #390

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
Prev Previous commit
Fixed non compliant line len.
  • Loading branch information
edwardguil committed Jan 14, 2024
commit 55d6df691bbafd5923332084fcb698f16781458e
5 changes: 3 additions & 2 deletions img2dataset/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 226,9 @@ def data_generator():
if self.compute_key_override is None:
str_key = compute_key(key, shard_id, oom_sample_per_shard, self.oom_shard_count)
else:
str_key = self.compute_key_override(key, shard_id, oom_sample_per_shard,
self.oom_shard_count, additional_columns)
str_key = self.compute_key_override(
key, shard_id, oom_sample_per_shard, self.oom_shard_count, additional_columns
)
meta = {
**additional_columns,
"key": str_key,
Expand Down
Loading