Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit test failure with deepspeed >= 0.15.4 #3482

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion TrainingExtensions/torch/test/python/v2/test_deepspeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import deepspeed as ds
import tempfile
import json
from packaging import version

from torch.utils.data import Dataset, DataLoader, RandomSampler

Expand Down Expand Up @@ -476,7 +477,12 @@ def test_deepspeed_zero3_offload_buckets_sync(unlabeled_data_loader,
data = data.cuda()
_ = sim_deepspeed.model(data)

param_coordinator = ds_optimizer._get_param_coordinator(False)
# NOTE: Some backwards-incompatible changes were made in deepspeed 0.15.4
if version.parse(ds.__version__) < version.parse("0.15.4"):
param_coordinator = ds_optimizer.parameter_offload.get_param_coordinator(False)
else:
param_coordinator = ds_optimizer.parameter_offload.get_param_coordinator()

assert param_coordinator.is_complete_trace()

with SafeGatheredParameters(sim_deepspeed.model.parameters()), torch.no_grad():
Expand Down
Loading