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

Dynamic adjusting dataloader sampling weight #7387

Open
whc688 opened this issue Feb 10, 2025 · 3 comments
Open

Dynamic adjusting dataloader sampling weight #7387

whc688 opened this issue Feb 10, 2025 · 3 comments

Comments

@whc688
Copy link

whc688 commented Feb 10, 2025

Hi,
Thanks for your wonderful work! I'm wondering is there a way to dynamically adjust the sampling weight of each data in the dataset during training? Looking forward to your reply, thanks again.

@lhoestq
Copy link
Member

lhoestq commented Feb 11, 2025

You mean based on a condition that has to be checked on-the-fly during training ? Otherwise if you know in advance after how many samples you need to change the sampling you can simply concatenate the two mixes

@whc688
Copy link
Author

whc688 commented Feb 11, 2025

Yes, like during training, if one data sample's prediction is consistently wrong, its sampling weight gets higher and higher, and if one data sample's prediction is already correct, then we rarely sample it

@lhoestq
Copy link
Member

lhoestq commented Feb 11, 2025

it's not possible to use interleave_datasets() and modify the probabilities while iterating on the dataset at the moment, so you'd have to implement your own IterableDataset to implement this logic

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

No branches or pull requests

2 participants