Skip to content

Commit

Permalink
Revert "fix deepspeed init config problem"
Browse files Browse the repository at this point in the history
This reverts commit 2e8afbc.
  • Loading branch information
skysbird committed Jul 30, 2023
1 parent f40d277 commit 27fc3de
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions vall_e/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
import torch
from tqdm import tqdm

from deepspeed.__init__ import DeepSpeedConfig
from deepspeed.accelerator import get_accelerator
from deepspeed.runtime import zero

from .config import cfg
from .data import create_train_val_dataloader
from .emb import qnt
Expand All @@ -17,24 +13,14 @@

_logger = logging.getLogger(__name__)

dist = None

# Disable zero.Init context if it's currently enabled
zero.partition_parameters.shutdown_init_context()

def load_engines():
model = get_model(cfg.model)

global dist
from deepspeed import comm as dist
dist_backend = get_accelerator().communication_backend_name()
dist.init_distributed(dist_backend=dist_backend)

engines = dict(
model=trainer.Engine(
model=model,
config=cfg.ds_cfg,
config_class=DeepSpeedConfig(config=cfg.ds_cfg)
),
)

Expand Down

0 comments on commit 27fc3de

Please sign in to comment.