-
Notifications
You must be signed in to change notification settings - Fork 443
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
Introduce AdaptiveRepeatDataHook for the classification #2428
Conversation
…aining_extensions into otx-adaptive-sampler
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 your work! It can reduce much overhead, I think. I left some comments, please take a look.
src/otx/algorithms/common/adapters/torch/dataloaders/samplers/balanced_sampler.py
Outdated
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/torch/dataloaders/samplers/otx_sampler.py
Outdated
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/torch/dataloaders/samplers/cls_incr_sampler.py
Outdated
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/mmcv/hooks/adaptive_repeat_data_hook.py
Outdated
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/mmcv/hooks/adaptive_repeat_data_hook.py
Outdated
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/torch/dataloaders/samplers/otx_sampler.py
Show resolved
Hide resolved
src/otx/algorithms/common/adapters/torch/dataloaders/samplers/otx_sampler.py
Show resolved
Hide resolved
Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com>
Thanks for the detailed review, it helps a lot :), I finished to reflect your review |
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.
LGTM. Thanks for applying lots of comment :)
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.
LGTM, I have one comment
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.
Thank you for the update. I have a few questions.
Summary
This PR introduces the
AdaptiveRepeatDataHook
andOTXSampler
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
When we considered to use the
AdaptiveRepeatDataHook
,AdaptiveSchedulingHook
should be disabled. So, I changed the default value at theconfiguration.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
License
Feel free to contact the maintainers if that's a concern.