Skip to content

Commit 5df5219

Browse files
Fix get distributed config (#122)
* fix(utils): get distributed deepspeed config error * fix(contributing.md): dangling links
1 parent b229288 commit 5df5219

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ Follow these steps to start contributing code:
4949
5050
Finally ... 🥁 ... Create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request) to the `trlX` repository! Make sure to include a description of your changes and link to any relevant issues.
5151
52-
> __Tip__: If you're looking to introduce an experimental feature, we suggest testing the behavior of your proposed feature on some of the existing [examples](https://github.com/CarperAI/trlx/tree/master/examples), such as [random walks](https://github.com/CarperAI/trlx/blob/master/examples/randomwalks.py). This will help you get a better sense of how the feature would work in practice and will also help you identify any potential flaws in the implementation.
52+
> __Tip__: If you're looking to introduce an experimental feature, we suggest testing the behavior of your proposed feature on some of the existing [examples](https://github.com/CarperAI/trlx/tree/master/examples), such as [random walks](https://github.com/CarperAI/trlx/blob/master/examples/randomwalks). This will help you get a better sense of how the feature would work in practice and will also help you identify any potential flaws in the implementation.
5353

5454
## Asking questions
5555

56-
Have a question? Rather than opening an issue, you can readily chat with the core team on our [Discord server](https://discord.gg/X2gHZMRP6m).
56+
Have a question? Rather than opening an issue, you can readily chat with the core team on our [Discord server](https://discord.gg/canadagoose).
5757

5858
## Code of conduct
5959

trlx/utils/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ def get_distributed_config(accelerator: Accelerator):
7171
"num_gpus": accelerate_config.num_processes,
7272
}
7373

74-
if hasattr(accelerator.state, "deepspeed_plugin"):
74+
if accelerator.state.deepspeed_plugin is not None:
7575
ds_plugin = accelerator.state.deepspeed_plugin
76-
dist_config.upate(
76+
dist_config.update(
7777
{
7878
"gradient_accumulation_steps": ds_plugin.gradient_accumulation_steps,
7979
"gradient_clipping": ds_plugin.gradient_clipping,

0 commit comments

Comments
 (0)