From d9992c00060b35b91be4f17799610660eb3f9fd3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 21:13:44 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- generate_data_properties.py | 1 + hifigandenoiser.py | 1 + src/data_module.py | 1 + src/hparams.py | 1 + src/model/DecoderComponents/flows.py | 1 + src/model/FlowDecoder.py | 1 + src/model/HMMComponents/Decoder.py | 1 + src/model/HMMComponents/TransitionModel.py | 1 + src/model/layers.py | 1 + src/training_module.py | 1 + src/utilities/data.py | 1 + src/utilities/functions.py | 1 + src/utilities/plotting.py | 1 + src/utilities/text/__init__.py | 1 + tests/src/model/test_FlowDecoder.py | 1 + train.py | 1 + 16 files changed, 16 insertions(+) diff --git a/generate_data_properties.py b/generate_data_properties.py index c8f78ae..92ffd0a 100644 --- a/generate_data_properties.py +++ b/generate_data_properties.py @@ -4,6 +4,7 @@ Parameters from hparam.py will be used """ + import argparse import os import sys diff --git a/hifigandenoiser.py b/hifigandenoiser.py index b0c364a..c249b55 100644 --- a/hifigandenoiser.py +++ b/hifigandenoiser.py @@ -1,4 +1,5 @@ """Waveglow style denoiser can be used to remove the artifacts from the HiFiGAN generated audio.""" + import torch from src.utilities.stft import STFT diff --git a/src/data_module.py b/src/data_module.py index 947cb03..80837b5 100644 --- a/src/data_module.py +++ b/src/data_module.py @@ -3,6 +3,7 @@ Contains PyTorch-Lightning's datamodule and dataloaders """ + import nltk import pytorch_lightning as pl from torch.utils.data import DataLoader diff --git a/src/hparams.py b/src/hparams.py index b1f9e0f..80ea63e 100644 --- a/src/hparams.py +++ b/src/hparams.py @@ -3,6 +3,7 @@ Hyper Parameters for the experiment """ + import os from argparse import Namespace diff --git a/src/model/DecoderComponents/flows.py b/src/model/DecoderComponents/flows.py index 17169fd..a822d83 100644 --- a/src/model/DecoderComponents/flows.py +++ b/src/model/DecoderComponents/flows.py @@ -1,6 +1,7 @@ """ Glow-TTS Code from https://github.com/jaywalnut310/glow-tts """ + import torch from torch import nn from torch.nn import functional as F diff --git a/src/model/FlowDecoder.py b/src/model/FlowDecoder.py index 3a6e910..bddb32a 100644 --- a/src/model/FlowDecoder.py +++ b/src/model/FlowDecoder.py @@ -1,6 +1,7 @@ """ Glow-TTS Code from https://github.com/jaywalnut310/glow-tts """ + import torch import torch.nn as nn diff --git a/src/model/HMMComponents/Decoder.py b/src/model/HMMComponents/Decoder.py index 9065485..1fdfaca 100644 --- a/src/model/HMMComponents/Decoder.py +++ b/src/model/HMMComponents/Decoder.py @@ -1,5 +1,6 @@ """Parameter Model This model takes state as an input and generates its parameters i.e mean, standard deviation and the probability of transition to the next state.""" + import torch import torch.nn as nn import torch.nn.functional as F diff --git a/src/model/HMMComponents/TransitionModel.py b/src/model/HMMComponents/TransitionModel.py index 0e8ede4..8ef3d62 100644 --- a/src/model/HMMComponents/TransitionModel.py +++ b/src/model/HMMComponents/TransitionModel.py @@ -3,6 +3,7 @@ This network is responsible for the models response of whether to switch to next state or keep emitting at the current state. """ + import torch import torch.nn as nn diff --git a/src/model/layers.py b/src/model/layers.py index ef1b786..90519f6 100644 --- a/src/model/layers.py +++ b/src/model/layers.py @@ -2,6 +2,7 @@ Layer modules used in the model design """ + import torch import torch.nn as nn from librosa.filters import mel as librosa_mel_fn diff --git a/src/training_module.py b/src/training_module.py index 89c9e9b..7441498 100644 --- a/src/training_module.py +++ b/src/training_module.py @@ -4,6 +4,7 @@ This file contains PyTorch Lightning's main module where code of the main model is implemented """ + import os from argparse import Namespace diff --git a/src/utilities/data.py b/src/utilities/data.py index f8464cd..8e6db08 100644 --- a/src/utilities/data.py +++ b/src/utilities/data.py @@ -3,6 +3,7 @@ Utilities for processing of Data """ + import random import numpy as np diff --git a/src/utilities/functions.py b/src/utilities/functions.py index 9fa96d6..0be0611 100644 --- a/src/utilities/functions.py +++ b/src/utilities/functions.py @@ -2,6 +2,7 @@ File for custom utility functions to improve numerical precision """ + import torch diff --git a/src/utilities/plotting.py b/src/utilities/plotting.py index 0062f3f..e0c20bb 100644 --- a/src/utilities/plotting.py +++ b/src/utilities/plotting.py @@ -3,6 +3,7 @@ File contains utilities for plotting """ + from typing import Any import matplotlib diff --git a/src/utilities/text/__init__.py b/src/utilities/text/__init__.py index a1b61f5..750cc45 100644 --- a/src/utilities/text/__init__.py +++ b/src/utilities/text/__init__.py @@ -1,4 +1,5 @@ """from https://github.com/keithito/tacotron.""" + import re from src.utilities.text import cleaners diff --git a/tests/src/model/test_FlowDecoder.py b/tests/src/model/test_FlowDecoder.py index e0e2ea6..f41ac0a 100644 --- a/tests/src/model/test_FlowDecoder.py +++ b/tests/src/model/test_FlowDecoder.py @@ -1,4 +1,5 @@ """Since it is taken from Glow-TTS, I am not implementing test for individual elements.""" + import pytest import torch diff --git a/train.py b/train.py index c7b82dd..a6e00f6 100644 --- a/train.py +++ b/train.py @@ -3,6 +3,7 @@ PyTorch-Lightning Trainer file, main file to run your training """ + import argparse import os