Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 10, 2024
1 parent e5964f3 commit abf3320
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion fairseq/distributed/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@

import torch
import torch.distributed as dist
from fairseq.dataclass.configs import DistributedTrainingConfig, FairseqConfig
from omegaconf import open_dict

from fairseq.dataclass.configs import DistributedTrainingConfig, FairseqConfig

try:
import torch_xla.core.xla_model as xm
except ImportError:
Expand Down
3 changes: 1 addition & 2 deletions fairseq/modules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
RotaryPositionMultiHeadedAttention,
)
from .fp32_group_norm import Fp32GroupNorm
from .gelu import gelu, gelu_accurate
from .grad_multiply import GradMultiply
from .gumbel_vector_quantizer import GumbelVectorQuantizer
from .layer_norm import Fp32LayerNorm, LayerNorm
from .multihead_attention import MultiheadAttention
from .positional_encoding import RelPositionalEncoding
from .same_pad import SamePad, SamePad2d
from .transpose_last import TransposeLast
from .gelu import gelu, gelu_accurate


__all__ = [
"Fp32GroupNorm",
Expand Down
4 changes: 3 additions & 1 deletion fairseq/optim/fairseq_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from collections import defaultdict

import torch

from fairseq import utils
from fairseq.dataclass.utils import gen_parser_from_dataclass
from collections import defaultdict


class FairseqOptimizer(object):
Expand Down

0 comments on commit abf3320

Please sign in to comment.