Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-x-c committed Dec 12, 2024
1 parent 48c111e commit 57df24c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions data_juicer/ops/filter/flagged_words_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def compute_stats_batched(self, samples, context=False):
def process_batched(self, samples):
return list(
map(
lambda stat: stat[StatsKeys.flagged_words_ratio] <= self.max_ratio,
lambda stat: stat[StatsKeys.flagged_words_ratio] <= self.
max_ratio,
samples[Fields.stats],
)
)
))
6 changes: 3 additions & 3 deletions data_juicer/ops/filter/image_aspect_ratio_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def compute_stats_batched(self, samples, context=False):
def process_batched(self, samples):

def process_single(values):
keep_bools = np.array(
[self.min_ratio <= value <= self.max_ratio for value in values]
)
keep_bools = np.array([
self.min_ratio <= value <= self.max_ratio for value in values
])
if len(keep_bools) <= 0:
return True

Expand Down

0 comments on commit 57df24c

Please sign in to comment.