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

Pickling support for LazyDict + minor fixes #292

Merged
merged 3 commits into from
May 3, 2021

Conversation

pzelasko
Copy link
Collaborator

@pzelasko pzelasko commented May 3, 2021

This solves an issue that is hard to notice unless one uses very large manifests -- when the mmapped file gets pickled for transfer to dataloader's worker processes, Python reads the whole file and tries to pickle it which blows up RAM. I changed the pickling behaviour for that class to only transfer the path to the file and re-open it in the new process. After this change, the training takes approx. 5-6GB CPU RAM per GPU, and I'm able to run snowfall training on full MLS with 4xGPU and on-the-fly feature extraction with no I/O or memory issues (with shuffle=False).

@pzelasko pzelasko added this to the v0.7 milestone May 3, 2021
@danpovey
Copy link
Collaborator

danpovey commented May 3, 2021 via email

@pzelasko pzelasko merged commit d5f23e8 into master May 3, 2021
@pzelasko pzelasko deleted the feature/improvements-large-data-training branch July 1, 2021 01:24
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

Successfully merging this pull request may close these issues.

2 participants