fix(optimizer/util.py) change inf defination

pull/147/head
Sun Peng 2023-07-27 10:12:51 +08:00 committed by GitHub
parent 754c5aa69a
commit ad10b8e03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5,11 +5,11 @@ from abc import ABC, abstractmethod
from typing import Dict, Optional
import amp_C
import math
import torch
import torch.distributed as dist
from apex.multi_tensor_apply import multi_tensor_applier
from torch import Tensor
from torch._six import inf
from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
from internlm.core.context import ParallelMode
@ -18,6 +18,8 @@ from internlm.utils.common import get_tensor_norm, move_norm_to_cuda
from internlm.utils.logger import get_logger
from internlm.utils.parallel import is_model_parallel_parameter
inf = math.inf
logger = get_logger(__file__)