#1188·tflearn

Library import error

Author: IMNascimentoCreated Dec 15, 2024Updated Dec 15, 2024

2024-12-15 14:17:09.030344: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-12-15 14:17:09.033634: I external/local_xla/xla/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used. 2024-12-15 14:17:09.043826: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1734283029.061006 36697 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered E0000 00:00:1734283029.065724 36697 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-12-15 14:17:09.082893: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. WARNING:tensorflow:From /home/whois/Documentos/code/python/PGPortfolio/venv/lib/python3.12/site-packages/tensorflow/python/compat/v2_compat.py:98: disable_resource_variables (from tensorflow.python.ops.resource_variables_toggle) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term Traceback (most recent call last): File "/home/whois/Documentos/code/python/PGPortfolio/main.py", line 12, in from pgportfolio.tools.shortcut import execute_backtest File "/home/whois/Documentos/code/python/PGPortfolio/pgportfolio/tools/shortcut.py", line 2, in from pgportfolio.trade.backtest import BackTest File "/home/whois/Documentos/code/python/PGPortfolio/pgportfolio/trade/backtest.py", line 3, in from pgportfolio.trade import trader File "/home/whois/Documentos/code/python/PGPortfolio/pgportfolio/trade/trader.py", line 4, in from pgportfolio.learn.rollingtrainer import RollingTrainer File "/home/whois/Documentos/code/python/PGPortfolio/pgportfolio/learn/rollingtrainer.py", line 4, in from pgportfolio.learn.tradertrainer import TraderTrainer File "/home/whois/Documentos/code/python/PGPortfolio/pgportfolio/learn/tradertrainer.py", line 10, in import tflearn File "/home/whois/Documentos/code/python/PGPortfolio/venv/lib/python3.12/site-packages/tflearn/init.py", line 25, in from .layers import normalization File "/home/whois/Documentos/code/python/PGPortfolio/venv/lib/python3.12/site-packages/tflearn/layers/init.py", line 11, in from .recurrent import lstm, gru, simple_rnn, bidirectional_rnn,
File "/home/whois/Documentos/code/python/PGPortfolio/venv/lib/python3.12/site-packages/tflearn/layers/recurrent.py", line 17, in from tensorflow.python.util.nest import is_sequence ImportError: cannot import name 'is_sequence' from 'tensorflow.python.util.nest' (/home/whois/Documentos/code/python/PGPortfolio/venv/lib/python3.12/site-packages/tensorflow/python/util/nest.py)

I made a pull request to import the library correctly into tensorflow