Skip to content

Commit

Permalink
fix(utils): extraction of mixed_precision option for deepspeed (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxreciprocate committed Jan 16, 2023
1 parent c25f598 commit 830f490
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions trlx/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ def get_distributed_config(accelerator: Accelerator):
Return accelerator distributed config
"""

accelerate_config = accelerator.state
dist_config = {
"mixed_precision": accelerate_config.mixed_precision,
"num_gpus": accelerate_config.num_processes,
"mixed_precision": accelerator.mixed_precision,
"num_gpus": accelerator.num_processes,
}

if accelerator.state.deepspeed_plugin is not None:
Expand Down

0 comments on commit 830f490

Please sign in to comment.