From 67c97ec4020d370b85c5a25c4b2f6b104f0df7b9 Mon Sep 17 00:00:00 2001 From: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:10:44 -0800 Subject: [PATCH] remove unused imports Signed-off-by: Xuesong Yang <1646669+XuesongYang@users.noreply.github.com> --- nemo/collections/nlp/modules/common/megatron/attention.py | 1 - .../nlp/modules/common/megatron/megatron_decoders.py | 1 - .../nlp/modules/common/megatron/megatron_encoder_decoder.py | 1 - nemo/collections/nlp/modules/common/megatron/utils.py | 1 - .../tts/models/speechllm/megatron_t5_speechllm_model.py | 3 +-- nemo/collections/tts/parts/utils/helpers.py | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) diff --git a/nemo/collections/nlp/modules/common/megatron/attention.py b/nemo/collections/nlp/modules/common/megatron/attention.py index d2cccfbb218c..d5784081f6f0 100644 --- a/nemo/collections/nlp/modules/common/megatron/attention.py +++ b/nemo/collections/nlp/modules/common/megatron/attention.py @@ -39,7 +39,6 @@ attention_mask_func, ) from nemo.core import adapter_mixins -from nemo.utils import logging try: from apex.transformer.enums import AttnMaskType, AttnType diff --git a/nemo/collections/nlp/modules/common/megatron/megatron_decoders.py b/nemo/collections/nlp/modules/common/megatron/megatron_decoders.py index e70b26e5cb08..d2945a061584 100644 --- a/nemo/collections/nlp/modules/common/megatron/megatron_decoders.py +++ b/nemo/collections/nlp/modules/common/megatron/megatron_decoders.py @@ -13,7 +13,6 @@ # limitations under the License. """Transformer based language model.""" -from ast import Mod from nemo.collections.nlp.modules.common.megatron.layer_type import LayerType from nemo.collections.nlp.modules.common.megatron.megatron_transformer_decoder import MegatronTransformerDecoderModule from nemo.collections.nlp.modules.common.megatron.retrieval_transformer import ( diff --git a/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py b/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py index 67753f08775e..744a6e18c8b1 100644 --- a/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py +++ b/nemo/collections/nlp/modules/common/megatron/megatron_encoder_decoder.py @@ -13,7 +13,6 @@ # limitations under the License. """Transformer based language model.""" -from ast import Mod import torch diff --git a/nemo/collections/nlp/modules/common/megatron/utils.py b/nemo/collections/nlp/modules/common/megatron/utils.py index 1540170a8dc1..b0a6f755a9cc 100644 --- a/nemo/collections/nlp/modules/common/megatron/utils.py +++ b/nemo/collections/nlp/modules/common/megatron/utils.py @@ -18,7 +18,6 @@ from typing import Dict, Iterator, List, Optional, Tuple, Union import torch -import torch.nn as nn from torch import Tensor from nemo.utils import logging, logging_mode diff --git a/nemo/collections/tts/models/speechllm/megatron_t5_speechllm_model.py b/nemo/collections/tts/models/speechllm/megatron_t5_speechllm_model.py index 02097f507e11..786c8c0e6e75 100644 --- a/nemo/collections/tts/models/speechllm/megatron_t5_speechllm_model.py +++ b/nemo/collections/tts/models/speechllm/megatron_t5_speechllm_model.py @@ -76,8 +76,7 @@ import time import librosa -import torchaudio -from torchaudio.pipelines import SQUIM_OBJECTIVE, SQUIM_SUBJECTIVE +from torchaudio.pipelines import SQUIM_SUBJECTIVE from transformers import Wav2Vec2FeatureExtractor, WavLMForXVector __all__ = ['MegatronT5SpeechLMModel'] diff --git a/nemo/collections/tts/parts/utils/helpers.py b/nemo/collections/tts/parts/utils/helpers.py index 1379fa169789..85d12a4261da 100644 --- a/nemo/collections/tts/parts/utils/helpers.py +++ b/nemo/collections/tts/parts/utils/helpers.py @@ -50,7 +50,6 @@ import numpy as np import seaborn as sns import torch -from einops import rearrange from numba import jit, prange from nemo.collections.tts.torch.tts_data_types import DATA_STR2DATA_CLASS, MAIN_DATA_TYPES, WithLens