File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ def __init__(
329
329
330
330
if deepspeed_plugins is None :
331
331
# First check if we're creating another `Accelerator` w/o setting `deepspeed_plugin`
332
- if PartialState ._shared_state != {} and PartialState ().distributed_type == DistributedType .DEEPSPEED :
332
+ if AcceleratorState ._shared_state != {} and AcceleratorState ().distributed_type == DistributedType .DEEPSPEED :
333
333
deepspeed_plugins = AcceleratorState ().deepspeed_plugins
334
334
else :
335
335
# init from env variables
@@ -339,8 +339,8 @@ def __init__(
339
339
else :
340
340
# If we're creating a second `Accelerator`, users shouldn't be passing in a `deepspeed_plugin`
341
341
if (
342
- PartialState (). distributed_type == DistributedType . DEEPSPEED
343
- and AcceleratorState . _shared_state != {}
342
+ AcceleratorState . _shared_state != {}
343
+ and AcceleratorState (). distributed_type == DistributedType . DEEPSPEED
344
344
and AcceleratorState ().deepspeed_plugins is not None
345
345
):
346
346
raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments