aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vscode/settings.json1
-rw-r--r--Makefile6
-rw-r--r--mypy.ini5
-rw-r--r--pyproject.toml4
-rw-r--r--requirements.txt4
-rw-r--r--swr2_asr/train.py9
6 files changed, 16 insertions, 13 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 60759a7..6d5637c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -6,4 +6,5 @@
"editor.rulers": [80, 120],
},
"black-formatter.importStrategy": "fromEnvironment",
+ "python.analysis.typeCheckingMode": "basic",
} \ No newline at end of file
diff --git a/Makefile b/Makefile
index 5653de7..703405f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
format:
- @poetry run black .
+ @black .
lint:
- @poetry run mypy --strict .
- @poetry run pylint swr2_asr \ No newline at end of file
+ @mypy --strict swr2_asr
+ @pylint swr2_asr \ No newline at end of file
diff --git a/mypy.ini b/mypy.ini
new file mode 100644
index 0000000..f5a713c
--- /dev/null
+++ b/mypy.ini
@@ -0,0 +1,5 @@
+[mypy-AudioLoader.*]
+ignore_missing_imports = True
+
+[mypy-torchaudio.*]
+ignore_missing_imports = true \ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 9c09a99..606633b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -33,10 +33,6 @@ name = "pytorch-gpu"
url = "https://download.pytorch.org/whl/cu118"
priority = "explicit"
-[[tool.mypy.overrides]]
-module = "torchaudio.*"
-ignore_missing_imports = true
-
[tool.poetry.scripts]
train = "swr2_asr.train:main"
diff --git a/requirements.txt b/requirements.txt
index f06451b..409d7b5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,5 +9,9 @@ numpy==1.25.2
sympy==1.12
torch==2.0.1
torchaudio==2.0.2
+black==23.7.0
+click==8.1.7
+mypy==1.5.1
+pylint==2.17.5
tqdm==4.66.1
typing_extensions==4.7.1
diff --git a/swr2_asr/train.py b/swr2_asr/train.py
index abe0e08..f61776a 100644
--- a/swr2_asr/train.py
+++ b/swr2_asr/train.py
@@ -1,12 +1,9 @@
-# import dataset
-# define model
-# define loss
-# define optimizer
-# train
+"""Training script for the ASR model."""
from AudioLoader.speech.mls import MultilingualLibriSpeech
-def main():
+def main() -> None:
+ """Main function."""
dataset = MultilingualLibriSpeech(
"data", "mls_polish_opus", split="train", download=True
)