Skip to content

Commit 413fa85

Browse files
authored
Update precommit CI action to latest version (#63)
* Update precommit CI action to latest version * Update flake8 and fix errors
1 parent 3560542 commit 413fa85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+68
-68
lines changed

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-python@v2
1414
with:
15-
python-version: '3.8'
16-
- uses: pre-commit/action@v2.0.3
15+
python-version: '3.12'
16+
- uses: pre-commit/action@v3.0.1

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.5.0 # Use the ref you want to point at
3+
rev: v5.0.0 # Use the ref you want to point at
44
hooks:
55
- id: trailing-whitespace
66
types: [file, text]
@@ -21,7 +21,7 @@ repos:
2121
types: [python]
2222
additional_dependencies: ['click==8.0.4']
2323
- repo: https://github.com/PyCQA/flake8
24-
rev: 3.7.9
24+
rev: 7.0.0
2525
hooks:
2626
- id: flake8
2727
types: [python]

benchmarks/CL_MASR/analyze_logs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ def plot_wer(
373373
plt.xticks(range(len(locales)), locales, rotation=90)
374374
if xlabel is not None:
375375
plt.xlabel(xlabel)
376-
plt.ylabel("WER (\%)" if usetex else "WER (%)") # noqa: W605
376+
plt.ylabel("WER (\\%)" if usetex else "WER (%)") # noqa: W605
377377
fig.tight_layout()
378378
plt.savefig(output_image, bbox_inches="tight")
379379
plt.close()
@@ -851,7 +851,7 @@ def hex_to_rgb(hex_color: "str") -> "Tuple":
851851
f"{name.lower().replace(' ', '_')}.{args.format}",
852852
),
853853
xlabel=None,
854-
ylabel=f"{name} (\%)"
854+
ylabel=f"{name} (\\%)"
855855
if args.usetex
856856
else f"{name} (%)", # noqa: W605
857857
xticks=["base"] + [f"L{i}" for i in range(1, 1 + len(new_locales))],

benchmarks/CL_MASR/common_voice_prepare.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def prepare_common_voice(
111111
_LOGGER.info(
112112
"----------------------------------------------------------------------",
113113
)
114-
_LOGGER.info(f"Merging TSV files...")
114+
_LOGGER.info("Merging TSV files...")
115115
for split, max_duration in zip(_SPLITS, max_durations):
116116
tsv_files = [
117117
os.path.join(data_folder, locale, f"{split}_with_duration.tsv")
@@ -126,7 +126,7 @@ def prepare_common_voice(
126126
_LOGGER.info(
127127
"----------------------------------------------------------------------",
128128
)
129-
_LOGGER.info(f"Creating data manifest CSV files...")
129+
_LOGGER.info("Creating data manifest CSV files...")
130130
for split in _SPLITS:
131131
preprocess_tsv_file(
132132
os.path.join(data_folder, f"{split}_with_duration.tsv"),

benchmarks/CL_MASR/wavlm/pretrain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def train(hparams, run_opts):
341341

342342
# Testing
343343
test(
344-
hparams, run_opts, hparams["locales"], f"wer_test.txt",
344+
hparams, run_opts, hparams["locales"], "wer_test.txt",
345345
)
346346

347347

benchmarks/CL_MASR/wavlm/train_agem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def train(hparams, run_opts):
431431

432432
# Testing
433433
test(
434-
hparams, run_opts, hparams["base_locales"], f"wer_test_before.txt",
434+
hparams, run_opts, hparams["base_locales"], "wer_test_before.txt",
435435
)
436436

437437
# Train on new locales

benchmarks/CL_MASR/wavlm/train_der.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def train(hparams, run_opts):
363363

364364
# Testing
365365
test(
366-
hparams, run_opts, hparams["base_locales"], f"wer_test_before.txt",
366+
hparams, run_opts, hparams["base_locales"], "wer_test_before.txt",
367367
)
368368

369369
replay_buffer = []

benchmarks/CL_MASR/wavlm/train_er.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def train(hparams, run_opts):
306306

307307
# Testing
308308
test(
309-
hparams, run_opts, hparams["base_locales"], f"wer_test_before.txt",
309+
hparams, run_opts, hparams["base_locales"], "wer_test_before.txt",
310310
)
311311

312312
# Train on new locales

benchmarks/CL_MASR/wavlm/train_ewc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def train(hparams, run_opts):
417417

418418
# Testing
419419
test(
420-
hparams, run_opts, hparams["base_locales"], f"wer_test_before.txt",
420+
hparams, run_opts, hparams["base_locales"], "wer_test_before.txt",
421421
)
422422

423423
# Train on new locales

benchmarks/CL_MASR/wavlm/train_ft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def train(hparams, run_opts):
305305

306306
# Testing
307307
test(
308-
hparams, run_opts, hparams["base_locales"], f"wer_test_before.txt",
308+
hparams, run_opts, hparams["base_locales"], "wer_test_before.txt",
309309
)
310310

311311
# Train on new locales

0 commit comments

Comments
 (0)