Skip to content

Commit

Permalink
fix pre-comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Nov 20, 2024
1 parent e1b76f5 commit 2a1a1a7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 15 deletions.
2 changes: 0 additions & 2 deletions data_juicer/ops/deduplicator/ray_basic_deduplicator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from pydantic import PositiveInt

from data_juicer.utils.constant import HashKeys
from data_juicer.utils.lazy_loader import LazyLoader

Expand Down
5 changes: 1 addition & 4 deletions data_juicer/ops/deduplicator/ray_document_deduplicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import string

import regex as re
from pydantic import PositiveInt

from ..base_op import OPERATORS
from .ray_basic_deduplicator import RayBasicDeduplicator
Expand Down Expand Up @@ -31,9 +30,7 @@ def __init__(self,
:param args: extra args
:param kwargs: extra args.
"""
super().__init__(redis_address=redis_address,
*args,
**kwargs)
super().__init__(redis_address=redis_address, *args, **kwargs)
self.lowercase = lowercase
self.remove_non_character_regex = re.compile(
f'\s+|\d+|[{re.escape(string.punctuation)}]' # noqa: W605
Expand Down
5 changes: 1 addition & 4 deletions data_juicer/ops/deduplicator/ray_image_deduplicator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import numpy as np
from pydantic import PositiveInt

from data_juicer.utils.lazy_loader import LazyLoader
from data_juicer.utils.mm_utils import load_data_with_context, load_image
Expand Down Expand Up @@ -46,9 +45,7 @@ def __init__(self,
:param args: extra args
:param kwargs: extra args
"""
super().__init__(redis_address=redis_address,
*args,
**kwargs)
super().__init__(redis_address=redis_address, *args, **kwargs)
if method not in HASH_METHOD:
raise ValueError(f'Keep strategy [{method}] is not supported. '
f'Can only be one of {HASH_METHOD}.')
Expand Down
6 changes: 1 addition & 5 deletions data_juicer/ops/deduplicator/ray_video_deduplicator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import hashlib

from pydantic import PositiveInt

from data_juicer.utils.mm_utils import (close_video, load_data_with_context,
load_video)

Expand Down Expand Up @@ -30,9 +28,7 @@ def __init__(self,
:param args: extra args
:param kwargs: extra args
"""
super().__init__(redis_address=redis_address,
*args,
**kwargs)
super().__init__(redis_address=redis_address, *args, **kwargs)

def calculate_hash(self, sample, context=False):
if self.video_key not in sample or not sample[self.video_key]:
Expand Down

0 comments on commit 2a1a1a7

Please sign in to comment.