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

Introduce AdaptiveRepeatDataHook for the classification #2428

Merged
merged 24 commits into from
Aug 16, 2023

Conversation

sungmanc
Copy link
Contributor

@sungmanc sungmanc commented Aug 9, 2023

Summary

This PR introduces the AdaptiveRepeatDataHook and OTXSampler for the classification now, later I will consider it for other tasks. It seems that it's not huge work that applies to other tasks.

By changing the number of iterations per epoch, we could significantly reduce the training time at the small data regime.
For the classification, we could check the improvements by checking the table below.

Number of training data: 16
Number of repeats: 5

mode performance gpu_mem iter_time data_time e2e_time
develop 0.870 3081 0.380 0.312 0:00:17
sampler 0.881 3084 0.215 (-43.3%) 0.147 (-53.1%) 0:00:13 (-25.4%)

When we considered to use the AdaptiveRepeatDataHook, AdaptiveSchedulingHook should be disabled. So, I changed the default value at the configuration.yaml

This commit(fb40fea) added to resolve the issue(#2427)

For now, this sampler only affects to the multi-class classification.

How to test

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have added e2e tests for validation.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@sungmanc sungmanc added ALGO Any changes in OTX Algo Tasks implementation DOC Improvements or additions to documentation labels Aug 9, 2023
@github-actions github-actions bot added the TEST Any changes in tests label Aug 9, 2023
@sungmanc sungmanc changed the title Introducing AdaptiveRepeatDataHook Introducing AdaptiveRepeatDataHook for the classification Aug 9, 2023
@sungmanc sungmanc changed the title Introducing AdaptiveRepeatDataHook for the classification Introduce AdaptiveRepeatDataHook for the classification Aug 9, 2023
@sungmanc sungmanc marked this pull request as ready for review August 10, 2023 06:55
@sungmanc sungmanc requested a review from a team as a code owner August 10, 2023 06:55
Copy link
Contributor

@eunwoosh eunwoosh left a comment

Choose a reason for hiding this comment

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

Thanks for your work! It can reduce much overhead, I think. I left some comments, please take a look.

@sungmanc
Copy link
Contributor Author

Thanks for your work! It can reduce much overhead, I think. I left some comments, please take a look.

Thanks for the detailed review, it helps a lot :), I finished to reflect your review

eunwoosh
eunwoosh previously approved these changes Aug 11, 2023
Copy link
Contributor

@eunwoosh eunwoosh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for applying lots of comment :)

jaegukhyun
jaegukhyun previously approved these changes Aug 11, 2023
Copy link
Contributor

@jaegukhyun jaegukhyun left a comment

Choose a reason for hiding this comment

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

LGTM, I have one comment

@sungmanc sungmanc dismissed stale reviews from jaegukhyun and eunwoosh via c71cce7 August 16, 2023 00:06
eunwoosh
eunwoosh previously approved these changes Aug 16, 2023
@sungmanc sungmanc requested a review from goodsong81 August 16, 2023 05:57
Copy link
Contributor

@goodsong81 goodsong81 left a comment

Choose a reason for hiding this comment

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

Thank you for the update. I have a few questions.

@sungmanc sungmanc merged commit 9000748 into openvinotoolkit:develop Aug 16, 2023
@sungmanc sungmanc mentioned this pull request Sep 5, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ALGO Any changes in OTX Algo Tasks implementation DOC Improvements or additions to documentation TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants