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 Jan 30, 2024
1 parent 95104f9 commit 6820ab5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions nemo/core/optim/distributed_adam.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
from typing import Callable, Dict, Iterable, Optional, Union

import torch

from apex.contrib.optimizers.distributed_fused_adam import (
DistributedFusedAdam,
_disable_pre_forward_hook,
_multi_tensor_copy,
)
from megatron.core import parallel_state
from megatron.core.dist_checkpointing.dict_utils import dict_list_map_inplace
from megatron.core.dist_checkpointing.mapping import ShardedTensor
from megatron.core.dist_checkpointing.optimizer import get_param_id_to_sharded_param_map, optim_state_to_sharding_state

from nemo.utils import str_to_dtype

from apex.contrib.optimizers.distributed_fused_adam import (
DistributedFusedAdam,
_disable_pre_forward_hook,
_multi_tensor_copy,
)

# Check if Transformer Engine has FP8 tensor class
HAVE_TE_FP8TENSOR = False
try:
Expand Down

0 comments on commit 6820ab5

Please sign in to comment.