Skip to content

Commit

Permalink
Fixed linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardguil committed Jan 14, 2024
1 parent b62bad5 commit d2a9ee9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions img2dataset/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def data_generator():
):
try:
_, sample_data = shard_to_dl[key]
additional_columns = {
# Skip columns containing a the verification hash and only save the compute hash
additional_columns = {
# Skip columns containing a the verification hash and only save the compute hash
**{
self.column_list[i]: sample_data[i]
for i in range(len(self.column_list))
Expand All @@ -226,9 +226,10 @@ def data_generator():
if self.compute_key is None:
str_key = compute_key(key, shard_id, oom_sample_per_shard, self.oom_shard_count)
else:
str_key = self.compute_key(key, shard_id, oom_sample_per_shard, self.oom_shard_count, additional_columns)
str_key = self.compute_key(key, shard_id, oom_sample_per_shard,
self.oom_shard_count, additional_columns)
meta = {
**additional_columns,
**additional_columns,
"key": str_key,
"status": None,
"error_message": error_message,
Expand Down
4 changes: 2 additions & 2 deletions img2dataset/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Img2dataset"""

from typing import List, Optional
from typing import List, Optional, Callable
import fire
import logging
from .logger import LoggerProcess
Expand Down Expand Up @@ -108,7 +108,7 @@ def download(
max_shard_retry: int = 1,
user_agent_token: Optional[str] = None,
disallowed_header_directives: Optional[List[str]] = None,
compute_key: Optional[callable] = None,
compute_key: Optional[Callable] = None,
):
"""Download is the main entry point of img2dataset, it uses multiple processes and download multiple files"""
if disallowed_header_directives is None:
Expand Down

0 comments on commit d2a9ee9

Please sign in to comment.