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

WRN Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory. #42

Open
EdwardChCriollo opened this issue May 27, 2020 · 3 comments

Comments

@EdwardChCriollo
Copy link

EdwardChCriollo commented May 27, 2020

WRN Starting a process with 'fork' method is not safe and may consume unnecessary extra CPU memory. Use 'forkserver' or 'spawn' method (available after Py3.4) instead if you run into any issues. See https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods on how to set them.

I received this warning on training stage and consumes all of memory RAM, which is the reason for this?, it seems like a tensorpack library issue but im not sure, any idea to solve this?
Tensorpack == 0.9.9
Tensorflow == 2.0
asd

@610265158
Copy link
Owner

610265158 commented May 27, 2020

yes, it is the tensorpack warning,

if you get small memory, you can set
config.TRAIN.process_num = 5
config.TRAIN.prefetch_size = 20

these two params to control it,

or you can set a small batchsize

in default config, 5 * 20 * 160 * 2 images will hold on your memory, may cost your problem, just tuning the params for dataiter

@EdwardChCriollo
Copy link
Author

Thanks a lot, I will try changing these parameters. I have seen an intensive use of ram(16gb) and SWAP(14gb) memory on my system, if i wanna train adding with 300vw dataset(200000 images, without consider data augmentation process), definitly I must have a lot of memory on my system, is that true?.

@610265158
Copy link
Owner

acutally , 16g memory is enough, use small batchsize and process_num,

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