-
Notifications
You must be signed in to change notification settings - Fork 941
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
Add warnings and fallback for unassigned devices in infer_auto_device_map #3066
base: main
Are you sure you want to change the base?
Conversation
src/accelerate/utils/modeling.py
Outdated
@@ -1465,6 +1469,13 @@ def infer_auto_device_map( | |||
f"offload_buffers=True." | |||
) | |||
|
|||
for device, mem in device_minimum_assignment_memory.items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has the potential to spam a lot of warnings. How about creating a single message and only warn once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out! I have addressed the issue in my new commit.
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. |
src/accelerate/utils/modeling.py
Outdated
f"Based on the current allocation process, no modules could be assigned to the following devices due to" | ||
f"insufficient memory:\n" | ||
f"{devices_info}\n" | ||
f"These minimum requirements are specific to this allocation attempt and may vary. Consider increasing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f"These minimum requirements are specific to this allocation attempt and may vary. Consider increasing" | |
f"These minimum requirements are specific to this allocation attempt and may vary. Consider increasing " |
What does this PR do?
This PR is proposed changes to the infer_auto_device_map function from #3041. It will make the following improvements:
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.