Skip to content
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

[tests] enable XPU backend for test_zero3_integration #2864

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

faaany
Copy link
Contributor

@faaany faaany commented Jun 17, 2024

What does this PR do?

python -m pytest -rA -k "test_zero3_integration" tests/deepspeed

The command above gives the following error:

E           Traceback (most recent call last):
E             File "/home/fanli/workspace/accelerate/src/accelerate/test_utils/scripts/external_deps/test_zero3_integration.py", line 52, in <module>
E               main()
E             File "/home/fanli/workspace/accelerate/src/accelerate/test_utils/scripts/external_deps/test_zero3_integration.py", line 48, in main
E               init_torch_dist_then_launch_deepspeed()
E             File "/home/fanli/workspace/accelerate/src/accelerate/test_utils/scripts/external_deps/test_zero3_integration.py", line 30, in init_torch_dist_then_launch_deepspeed
E               torch.distributed.init_process_group(backend="nccl")
E             File "/home/fanli/miniforge3/envs/acc-ut-ww23/lib/python3.9/site-packages/torch/distributed/c10d_logger.py", line 75, in wrapper
E               return func(*args, **kwargs)
E             File "/home/fanli/miniforge3/envs/acc-ut-ww23/lib/python3.9/site-packages/torch/distributed/c10d_logger.py", line 89, in wrapper
E               func_return = func(*args, **kwargs)
E             File "/home/fanli/miniforge3/envs/acc-ut-ww23/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 1312, in init_process_group
E               default_pg, _ = _new_process_group_helper(
E             File "/home/fanli/miniforge3/envs/acc-ut-ww23/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 1513, in _new_process_group_helper
E               raise RuntimeError("Distributed package doesn't have NCCL built in")
E           RuntimeError: Distributed package doesn't have NCCL built in
E           /home/fanli/miniforge3/envs/acc-ut-ww23/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py:613: UserWarning: Attempted to get default timeout for nccl backend, but NCCL support is not compiled
E             warnings.warn("Attempted to get default timeout for nccl backend, but NCCL support is not compiled")

Pls let me know if I need to add support for other devices as well. @muellerzr @SunMarc

@faaany faaany marked this pull request as ready for review June 18, 2024 01:14
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, overall this looks okay to me with this. We can try the other devices as long as you can test them

Copy link
Member

@SunMarc SunMarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM !

@faaany
Copy link
Contributor Author

faaany commented Jun 26, 2024

@SunMarc can we proceed with merging? Thanks so much!

@SunMarc SunMarc merged commit c799c19 into huggingface:main Jun 26, 2024
23 checks passed
byi8220 pushed a commit to byi8220/accelerate that referenced this pull request Jun 26, 2024
muellerzr added a commit that referenced this pull request Aug 22, 2024
…er` within the `Accelerator` (#2895)

* temporary commit

* checkout?

* dataloader wrapper

* tmp

* weird failing test

* trying multiple inheritance

* DataLoaderAdapter

* make style

* Some dark magic dynamic reflection (for backwards compat)

* typo

* some tests

* more mixin stuff

* maybe found broken test?

* this is a very invasive feature

* i think the feature is done?

* add xpu support (#2864)

* better tests

* discovered a bug

* maybe fixed bug?

* make style

* hopefully this is PR ready

* properly skip tests

* parameterize

* temporary commit

* checkout?

* dataloader wrapper

* tmp

* weird failing test

* trying multiple inheritance

* DataLoaderAdapter

* make style

* Some dark magic dynamic reflection (for backwards compat)

* typo

* some tests

* more mixin stuff

* maybe found broken test?

* this is a very invasive feature

* i think the feature is done?

* better tests

* discovered a bug

* maybe fixed bug?

* make style

* hopefully this is PR ready

* properly skip tests

* parameterize

* Update src/accelerate/utils/dataclasses.py

Co-authored-by: Zach Mueller <muellerzr@gmail.com>

* Update src/accelerate/data_loader.py

Co-authored-by: Zach Mueller <muellerzr@gmail.com>

* merge conflicts

* move imports

* make style

* merges are breaking tests

* fix test name

* Require safetensors>=0.4.3

* undo last commit

* minor style

* address pr comments

* Torchdata version 0.8.0 is stable now

* added docs and require torchdata>=0.8.0 for testing

* test base_dataloader attr doesn't cause infinite recursion

* address pr

* replace super().__iter__ with self.base_dataloader.__iter__

---------

Co-authored-by: Fanli Lin <fanli.lin@intel.com>
Co-authored-by: Zach Mueller <muellerzr@gmail.com>
@faaany faaany deleted the xpu branch November 4, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants