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__(
329329
330330 if deepspeed_plugins is None :
331331 # 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 :
333333 deepspeed_plugins = AcceleratorState ().deepspeed_plugins
334334 else :
335335 # init from env variables
@@ -339,8 +339,8 @@ def __init__(
339339 else :
340340 # If we're creating a second `Accelerator`, users shouldn't be passing in a `deepspeed_plugin`
341341 if (
342- PartialState (). distributed_type == DistributedType . DEEPSPEED
343- and AcceleratorState . _shared_state != {}
342+ AcceleratorState . _shared_state != {}
343+ and AcceleratorState (). distributed_type == DistributedType . DEEPSPEED
344344 and AcceleratorState ().deepspeed_plugins is not None
345345 ):
346346 raise NotImplementedError (
You can’t perform that action at this time.
0 commit comments