Skip to content

Commit

Permalink
updated precommits
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianGroeger96 committed Apr 9, 2024
1 parent b1fafdf commit 5defc1e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
name: "Remove trailing whitespaces"
Expand All @@ -14,23 +14,23 @@ repos:
args: ["--fix=lf"]
description: Force replacement of line ending by the UNIX 'lf' character
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.33.0
rev: v1.35.1
hooks:
- id: yamllint
args: ["-c=.yamllint"]
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
types: [python]
language: python
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
18 changes: 9 additions & 9 deletions src/cleaner/auto_cleaning_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def perform_auto_cleaning(
if self.auto_cleaning:
# Near Duplicates
if output_path is not None:
self.cleaner_kwargs[
"path"
] = f"{output_path.stem}_auto_dups{output_path.suffix}"
self.cleaner_kwargs["path"] = (
f"{output_path.stem}_auto_dups{output_path.suffix}"
)
self.cleaner_kwargs["alpha"] = self.near_duplicate_cut_off
issues_dup = self.fraction_cut(
scores=pred_near_duplicate_scores,
Expand All @@ -54,9 +54,9 @@ def perform_auto_cleaning(

# Irrelevant Samples
if output_path is not None:
self.cleaner_kwargs[
"path"
] = f"{output_path.stem}_auto_oods{output_path.suffix}"
self.cleaner_kwargs["path"] = (
f"{output_path.stem}_auto_oods{output_path.suffix}"
)
self.cleaner_kwargs["alpha"] = self.irrelevant_cut_off
issues_ood = self.fraction_cut(
scores=pred_irrelevant_scores,
Expand All @@ -67,9 +67,9 @@ def perform_auto_cleaning(
# Label Errors
if pred_label_error_scores is not None:
if output_path is not None:
self.cleaner_kwargs[
"path"
] = f"{output_path.stem}_auto_lbls{output_path.suffix}"
self.cleaner_kwargs["path"] = (
f"{output_path.stem}_auto_lbls{output_path.suffix}"
)
self.cleaner_kwargs["alpha"] = self.label_error_cut_off
issues_lbl = self.fraction_cut(
scores=pred_label_error_scores,
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_library
2 changes: 1 addition & 1 deletion tests/unittests/cleaner/test_issue_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_get_issues_as_dataframe(self):
def test_get_wrong(self):
self.assertIsInstance(self.issues, IssueManager)
with self.assertRaises(ValueError):
_ = self.issues['irr']
_ = self.issues["irr"]


if __name__ == "__main__":
Expand Down

0 comments on commit 5defc1e

Please sign in to comment.