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

Reduce RAM usage: remove excess workers #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikich340
Copy link

Leaving 8 workers lead to x8 times more RAM usage when preloading mel spectrograms, when it is not needed for single-process training.

Copy link

@shivammehta25 shivammehta25 left a comment

Choose a reason for hiding this comment

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

It shouldn't be added to the official codebase, generally, people want to benefit from multiprocessing.

@nikich340
Copy link
Author

It shouldn't be added to the official codebase, generally, people want to benefit from multiprocessing.

Have you looked into the commit? It changes hardcoded behaviour "I have 8 gpus, use 8 train loaders" to "I have N gpus, use N train loaders".
I am sure most of people using this repo don't have 8 gpus and so much RAM for useless loader copies.

@lexkoro
Copy link

lexkoro commented Jun 13, 2023

@nikich340 num_workers has nothing to do with the number of GPUs you have.

@nikich340
Copy link
Author

nikich340 commented Jun 14, 2023

@nikich340 num_workers has nothing to do with the number of GPUs you have.

Ok, then there still should be a way to check if user really needs this, when every worker uses 4 gb of ram and it overfits real memory, using swap file give no benefit at all.

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.

3 participants