You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instructions about how to install tsgm with a specific tensorflow version when you meet " No module named 'tf_keras'" or ''ImportError: keras.optimizers.legacy is not supported in Keras 3."
#42
Closed
liyiersan opened this issue
Mar 20, 2024
· 2 comments
Thanks for your nice work, tsgm helps me a lot when dealing with time series data.
When installing tsgm via ''pip install tsgm'', it will automatically install the newest TensorFlow and sometimes it may cause package conflicts.
Here is an instruction about how to specify the TensorFlow, especially on GPUs.
1, Firstly, you need to make sure CUDA and the corresponding cuDNN have been correctly installed in your environment. Check it by using "nvcc -V".
nvcc -V
2, Secondly, install TensorFlow via "pip install tensorflow==2.X.X". If you correctly configure CUDA and cuDNN in your environment, tensorflow-gpu will be available.
pip install tensorflow==2.14.0 # 2.14.0 for example
You can check it by running
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
3, Install tsgm via pip.
pip install tsgm
Notes:
1, The compatible versions of CUDA, cuDNN, and TensorFlow can be found at https://tensorflow.google.cn/install/source#tested_build_configurations . Remember to change the language to English.
2, If you want to install a specific Tensorflow not compatible with your local CUDA and cuDNN. You can install it in a virtual environment by conda. Just install cudatoolkit and cudnn in your virtual environment before you install TensorFlow.
conda install cudnn=x.x.x -c conda-forge # it will automatically install cudatoolkit
conda list # check cuda and cudnn
Update 03/20/2024, if you install tsgm directly using pip install tsgm. Some problems may happen due to the following reasons.
1, TensorFlow 2.16.1 and tensorflow-probability 0.2.40 will be installed. However, tsgm is built based on keras2, which is not compatible with Keras3 in tf2.16+. see https://github.com/tensorflow/tensorflow/releases.
2, If you want to use tsgm, here are two ways: 1) Downgrade the TensorFlow to 2.15 or lower. 2) Do as the figure suggests.
3, I suggest that authors update the docs about how to install tsgm or set a limitation on the required version of TensorFlow and tensorflow-probability.
4, Actually, I am a Pytorch user and I am not familiar with TensorFlow. TSGM is really a good repo for time series data processing. If someone is interested in constructing a Pytorch version of TSGM, please email me at zhouqian@whu.edu.cn. I am very glad to build an open-source repo of tsgm-pytorch.
5, Again, thanks the authors' great work.
The text was updated successfully, but these errors were encountered:
Thanks for your nice work, tsgm helps me a lot when dealing with time series data.
When installing tsgm via ''pip install tsgm'', it will automatically install the newest TensorFlow and sometimes it may cause package conflicts.
Here is an instruction about how to specify the TensorFlow, especially on GPUs.
1, Firstly, you need to make sure CUDA and the corresponding cuDNN have been correctly installed in your environment. Check it by using "nvcc -V".
2, Secondly, install TensorFlow via "pip install tensorflow==2.X.X". If you correctly configure CUDA and cuDNN in your environment, tensorflow-gpu will be available.
pip install tensorflow==2.14.0 # 2.14.0 for example
You can check it by running
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
3, Install tsgm via pip.
Notes:
1, The compatible versions of CUDA, cuDNN, and TensorFlow can be found at https://tensorflow.google.cn/install/source#tested_build_configurations . Remember to change the language to English.
2, If you want to install a specific Tensorflow not compatible with your local CUDA and cuDNN. You can install it in a virtual environment by conda. Just install cudatoolkit and cudnn in your virtual environment before you install TensorFlow.
3, Make sure the tensorflow-probability matches your TensorFlow version. see https://github.com/tensorflow/probability/releases.
4, You may need to install statsmodels manually.
Update 03/20/2024, if you install tsgm directly using pip install tsgm. Some problems may happen due to the following reasons.
1, TensorFlow 2.16.1 and tensorflow-probability 0.2.40 will be installed. However, tsgm is built based on keras2, which is not compatible with Keras3 in tf2.16+. see https://github.com/tensorflow/tensorflow/releases.
2, If you want to use tsgm, here are two ways: 1) Downgrade the TensorFlow to 2.15 or lower. 2) Do as the figure suggests.
3, I suggest that authors update the docs about how to install tsgm or set a limitation on the required version of TensorFlow and tensorflow-probability.
4, Actually, I am a Pytorch user and I am not familiar with TensorFlow. TSGM is really a good repo for time series data processing. If someone is interested in constructing a Pytorch version of TSGM, please email me at zhouqian@whu.edu.cn. I am very glad to build an open-source repo of tsgm-pytorch.
5, Again, thanks the authors' great work.
The text was updated successfully, but these errors were encountered: