From bf323b9596c0752e791c1899852ac8b984d5b3a2 Mon Sep 17 00:00:00 2001 From: YamaByte <167049609+YamaByte@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:10:40 +0800 Subject: [PATCH] Update tsfresh_on_a_cluster.rst Added recommendation to revert thread limitations to not hinder downstream machine learning tasks that relies on those for parallelization. --- docs/text/tsfresh_on_a_cluster.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/text/tsfresh_on_a_cluster.rst b/docs/text/tsfresh_on_a_cluster.rst index b6bcc3fa..74c6281f 100644 --- a/docs/text/tsfresh_on_a_cluster.rst +++ b/docs/text/tsfresh_on_a_cluster.rst @@ -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. +