jpuigcerver / PyLaia

A deep learning toolkit specialized for handwritten document analysis
MIT License
207 stars 43 forks source link

Expose num_workers attribute on DataModule to limit resources usage #52

Closed yschneider-sinneria closed 1 year ago

yschneider-sinneria commented 1 year ago

Pytorch uses workers to parallelize data. Having more workers increases the memory usage and can cause training processes to be killed.

In a Docker environment where RAM is limited, this can be troublesome. It would be nice to be able to set this parameter with any given value instead on always relying on the number of cores available.