Skip to content

Commit

Permalink
[deepspeed] replaced deprecated init arg (#13587)
Browse files Browse the repository at this point in the history
* [deepspeed] replaced deprecated init arg

* Trigger CI
  • Loading branch information
stas00 authored Sep 16, 2021
1 parent 4d5b4c7 commit bec2e3f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"cookiecutter==1.7.2",
"dataclasses",
"datasets",
"deepspeed>=0.5.1",
"deepspeed>=0.5.3",
"docutils==0.16.0",
"fairscale>0.3",
"faiss-cpu",
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/dependency_versions_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cookiecutter": "cookiecutter==1.7.2",
"dataclasses": "dataclasses",
"datasets": "datasets",
"deepspeed": "deepspeed>=0.5.1",
"deepspeed": "deepspeed>=0.5.3",
"docutils": "docutils==0.16.0",
"fairscale": "fairscale>0.3",
"faiss-cpu": "faiss-cpu",
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def _from_config(cls, config, **kwargs):
logger.info("Detected DeepSpeed ZeRO-3: activating zero.init() for this model")
# this immediately partitions the model across all gpus, to avoid the overhead in time
# and memory copying it on CPU or each GPU first
with deepspeed.zero.Init(config=deepspeed_config()):
with deepspeed.zero.Init(config_dict_or_path=deepspeed_config()):
model = cls(config, **kwargs)
else:
model = cls(config, **kwargs)
Expand Down

0 comments on commit bec2e3f

Please sign in to comment.