-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[hardware] refactor: replace device_name with config.trainer.device #2542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ torchrun --standalone --nnodes=1 --nproc_per_node=8 \ | |
| model.target_modules=all-linear \ | ||
| model.strategy=fsdp \ | ||
| ulysses_sequence_parallel_size=2 \ | ||
| use_remove_padding=true | ||
| use_remove_padding=true \ | ||
| trainer.device=npu | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| rm -rf ./outputs ./save_ckpts | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -270,7 +270,6 @@ def __init__( | |||||
| worker_names=None, | ||||||
| worker_handles: list[ray.actor.ActorHandle] = None, | ||||||
| ray_wait_register_center_timeout: int = 300, | ||||||
| device_name="cuda", | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @as12138 I agree it's a good refactor to move
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Of course, I have already added it. |
||||||
| **kwargs, | ||||||
| ) -> None: | ||||||
| """Initialize a RayWorkerGroup. | ||||||
|
|
@@ -294,7 +293,7 @@ def __init__( | |||||
| # if a WorkerGroup is spawned from Colocate WorkerGroup, this indicates which sub-class is binded to | ||||||
| # this WorkerGroup. | ||||||
| self.sub_cls_name = "" | ||||||
| self.device_name = device_name | ||||||
| self.device_name = kwargs.get("device_name", "cuda") | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default value for
Suggested change
|
||||||
| self.profile_steps = kwargs.get("profile_steps", None) | ||||||
| self.worker_nsight_options = kwargs.get("worker_nsight_options", None) | ||||||
| if self.worker_nsight_options is not None and self.worker_nsight_options["capture-range-end"] is None: | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,3 +65,4 @@ trainer: | |
| nnodes: 1 | ||
| n_gpus_per_node: 8 | ||
| max_ckpt_to_keep: null # TODO | ||
| device: cuda | ||
Uh oh!
There was an error while loading. Please reload this page.