[deepspeed] replaced deprecated init arg (#13587)
* [deepspeed] replaced deprecated init arg * Trigger CI
This commit is contained in:
2
setup.py
2
setup.py
@@ -90,7 +90,7 @@ _deps = [
|
|||||||
"cookiecutter==1.7.2",
|
"cookiecutter==1.7.2",
|
||||||
"dataclasses",
|
"dataclasses",
|
||||||
"datasets",
|
"datasets",
|
||||||
"deepspeed>=0.5.1",
|
"deepspeed>=0.5.3",
|
||||||
"docutils==0.16.0",
|
"docutils==0.16.0",
|
||||||
"fairscale>0.3",
|
"fairscale>0.3",
|
||||||
"faiss-cpu",
|
"faiss-cpu",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ deps = {
|
|||||||
"cookiecutter": "cookiecutter==1.7.2",
|
"cookiecutter": "cookiecutter==1.7.2",
|
||||||
"dataclasses": "dataclasses",
|
"dataclasses": "dataclasses",
|
||||||
"datasets": "datasets",
|
"datasets": "datasets",
|
||||||
"deepspeed": "deepspeed>=0.5.1",
|
"deepspeed": "deepspeed>=0.5.3",
|
||||||
"docutils": "docutils==0.16.0",
|
"docutils": "docutils==0.16.0",
|
||||||
"fairscale": "fairscale>0.3",
|
"fairscale": "fairscale>0.3",
|
||||||
"faiss-cpu": "faiss-cpu",
|
"faiss-cpu": "faiss-cpu",
|
||||||
|
|||||||
@@ -492,7 +492,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
|
|||||||
logger.info("Detected DeepSpeed ZeRO-3: activating zero.init() for this model")
|
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
|
# this immediately partitions the model across all gpus, to avoid the overhead in time
|
||||||
# and memory copying it on CPU or each GPU first
|
# 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)
|
model = cls(config, **kwargs)
|
||||||
else:
|
else:
|
||||||
model = cls(config, **kwargs)
|
model = cls(config, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user