Skip to content

Commit

Permalink
Update tsfresh_on_a_cluster.rst (#1069)
Browse files Browse the repository at this point in the history
Added recommendation to revert thread limitations to not hinder downstream machine learning tasks that relies on those for parallelization.
  • Loading branch information
YamaByte authored May 26, 2024
1 parent a7e14f8 commit fcdc41b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/text/tsfresh_on_a_cluster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,11 @@ This issue can be solved by constraining the C libraries to single threads, usin
Put these lines at the beginning of your notebook/python script - before you call any tsfresh code or import any other module.

The more cores your host computer has, the more improvement in processing speed will be gained by implementing these environment changes. Speed increases of between 6x and 26x have been observed depending on the type of the host machine.

.. NOTE::
If you intend to run machine learning pipelines after feature extraction, it is highly recommended to revert these changes.
Settings have been tested on GPU-accelerated XGBoost classifier training task with 9x speed reduction.
Many popular machine learning libraries like scikit-learn and Tensorflow/PyTorch rely on parallelization of your CPU cores to speed up CPU-dependent low-level computations.
By forcing those libraries to only use a single thread, it creates a bottleneck for other downstream tasks even if you are accelerating them with GPUs.
e.g. CPU-computation of loss function after every PyTorch neural network forward pass will only run on one thread, while the GPU idles and waits for its completion before starting on its backpropogation tasks.

0 comments on commit fcdc41b

Please sign in to comment.