-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
Support : Leverage Accelerate for object detection/segmentation models #28312
Support : Leverage Accelerate for object detection/segmentation models #28312
Conversation
Hi, thanks for your PR. It looks like there's an issue with the segmentation models. |
@NielsRogge could you take a look at this PR again . I have made required changes for segmentation models. |
Thanks, LGTM. |
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 working on this @Tanmaypatil123!
Just a comment on the imports
from accelerate import PartialState | ||
from accelerate.utils import reduce |
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 needs to be behind a protected import:
if is_accelerate_available():
from accelerate import PartialState
from accelerate.utils import reduce
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 iterating! Changes look good to me.
Before merging could you:
- Run the slow tests for these models to confirm everything still passes? e.g.
RUN_SLOW=1 pytest tests/models/conditional_detr/
- Test at least one of these models in a single and multi-GPU environment with the loss calculation i.e. labels passed in?
- Resolve conflicts
hey @amyeroberts removed conflicts .but whenever I tried to run test cases by |
@Tanmaypatil123 - Not sure exactly what's causing this. The function In a python session, are you about to run:
? Could you try rebasing on main to make sure all updates/fixes are included in this branch? |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
The issue is related to evaluate I think: huggingface/peft#1351 |
cc @Tanmaypatil123 let's rebase this and I think we could merge this! |
@ArthurZucker Changes are approved but there is issue with segmentation model; test cases fails for it and i could not figure out what the problem is. |
@Tanmaypatil123 you just need to fix the upstream conflicts, like so:
|
@ArthurZucker I have resolved the conflicts |
@Tanmaypatil123 Great! For the failing tests, there's two which look like they might be related to this PR which will needed to be addressed before merge:
For the build documentation tests, there was a recent fix merged into main. Rebasing to include this should resolve. |
Don't know how that test case is failing. I didn't make any changes to the parameters that are provided to |
@Tanmaypatil123 Indeed. It's quite weird these tests are failing as they don't seem related to this PR. They aren't however failing on any other PRs. What I think is happening is that some tests weren't collected by the test fetched (cc @ydshieh for reference) when the image feature extraction pipeline was added. And now, because this PR touches yolos they're being run now. I'm going to look into it and let you know asap. |
@amyeroberts Done 😀 Thanks for the help. Huggingface has the best open source maintainers. |
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. |
@Tanmaypatil123 Thanks for this great contribution and patience with our failing CI tests! |
huggingface#28312) * made changes for object detection models * added support for segmentation models. * Made changes for segmentaion models * Changed import statements * solving conflicts * removed conflicts * Resolving commits * Removed conflicts * Fix : Pixel_mask_value set to False
#28312) * made changes for object detection models * added support for segmentation models. * Made changes for segmentaion models * Changed import statements * solving conflicts * removed conflicts * Resolving commits * Removed conflicts * Fix : Pixel_mask_value set to False
What does this PR do?
Adding support for multi-GPU training in 6 object detection models and segmentation models.
Fixes # #28309
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.
@NielsRogge