huangyh09 / brie

BRIE: Bayesian Regression for Isoform Estimate in Single Cells
https://brie.readthedocs.io
Apache License 2.0
41 stars 15 forks source link

brie-quant uses all available resources #49

Closed supermaxiste closed 2 years ago

supermaxiste commented 2 years ago

Hello,

I was wondering if there was any plan to add resource usage (i.e. number of threads) as an option to use brie-quant. Right now the code has maximum resources hardcoded:

https://github.com/huangyh09/brie/blob/8f83c566f9d9a614807f6cf0fa80de5f2d283804/brie/bin/quant.py#L207-L211

This is an issue for people using shared computer clusters. I didn't have time to test this, but would changing this line of code lead to less resources used?

Thank you in advance for the reply

huangyh09 commented 2 years ago

Thanks for raising this important issue. Indeed TensorFlow will use all available CPU threads by default. We have just fixed it in the new release v2.2.2. By default, it will use up to 6 threads.

https://github.com/huangyh09/brie/blob/2a9e13aca7a6f2a1638cd906bb71d3ecbd911dc1/brie/bin/quant.py#L207-L211

Yuanhua