Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow and keras dependencies not met. #12

Closed
Utkarsh-quytech opened this issue Feb 28, 2024 · 7 comments
Closed

Tensorflow and keras dependencies not met. #12

Utkarsh-quytech opened this issue Feb 28, 2024 · 7 comments

Comments

@Utkarsh-quytech
Copy link

Hey there!!
I was using python version 9.7.12 in anaconda env and even after installing the requirements.txt file i get the below error.
Any help is much appreciated!! Thanks!!
Traceback (most recent call last):
File "main.py", line 12, in
from utils.tools import read_yaml, Logger
File "C:\Users\Utkarsh.Singh\Documents\Utkarsh\PoseTracking\AcT\utils\tools.py", line 21, in
from tensorflow.keras.optimizers.schedules import LearningRateSchedule
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\api_v2\keras_init_.py", line 12, in
from keras import version
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras_init_.py", line 21, in
from keras import models
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\models_init_.py", line 18, in
from keras.engine.functional import Functional
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\engine\functional.py", line 26, in
from keras import backend
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\backend.py", line 34, in
from keras.engine import keras_tensor
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\engine\keras_tensor.py", line 19, in
from keras.utils import object_identity
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\utils_init_.py", line 48, in
from keras.utils.layer_utils import get_source_inputs
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\utils\layer_utils.py", line 26, in
from keras import initializers
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\initializers_init_.py", line 22, in
from keras.initializers import initializers_v2
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\initializers\initializers_v2.py", line 23, in
from keras.dtensor import utils
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\dtensor_init_.py", line 22, in
from tensorflow.compat.v2.experimental import dtensor as dtensor_api
ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental' (C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\tensorflow_api\v2\compat\v2\experimental_init_.py)

(act) C:\Users\Utkarsh.Singh\Documents\Utkarsh\PoseTracking\AcT>python main.py -b
Traceback (most recent call last):
File "main.py", line 12, in
from utils.tools import read_yaml, Logger
File "C:\Users\Utkarsh.Singh\Documents\Utkarsh\PoseTracking\AcT\utils\tools.py", line 21, in
from tensorflow.keras.optimizers.schedules import LearningRateSchedule
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\api_v2\keras_init_.py", line 12, in
from keras import version
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras_init_.py", line 21, in
from keras import models
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\models_init_.py", line 18, in
from keras.engine.functional import Functional
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\engine\functional.py", line 26, in
from keras import backend
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\backend.py", line 34, in
from keras.engine import keras_tensor
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\engine\keras_tensor.py", line 19, in
from keras.utils import object_identity
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\utils_init_.py", line 48, in
from keras.utils.layer_utils import get_source_inputs
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\utils\layer_utils.py", line 26, in
from keras import initializers
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\initializers_init_.py", line 22, in
from keras.initializers import initializers_v2
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\initializers\initializers_v2.py", line 23, in
from keras.dtensor import utils
File "C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\keras\dtensor_init_.py", line 22, in
from tensorflow.compat.v2.experimental import dtensor as dtensor_api
ImportError: cannot import name 'dtensor' from 'tensorflow.compat.v2.experimental' (C:\Users\Utkarsh.Singh\anaconda3\envs\act\lib\site-packages\tensorflow_api\v2\compat\v2\experimental_init_.py)

@simoneangarano
Copy link
Member

Hi,
What version of TF are you using?

@Utkarsh-quytech
Copy link
Author

Hi, What version of TF are you using?

Name Version Build Channel

tensorflow 2.6.0 pypi_0 pypi
tensorflow-addons 0.14.0 pypi_0 pypi
tensorflow-datasets 4.4.0 pypi_0 pypi
tensorflow-estimator 2.15.0 pypi_0 pypi
tensorflow-metadata 1.12.0 pypi_0 pypi

@simoneangarano
Copy link
Member

Ok, this is my current environment, and everything works:

Package Version

absl-py 1.4.0
joblib 1.2.0
matplotlib 3.7.1
mpose 1.2
numpy 1.20.3
optuna 3.2.0
pandas 2.0.1
PyYAML 6.0
scikit-learn 1.3.2
scipy 1.10.1
tensorboard 2.10.1
tensorflow 2.10.0
tensorflow-addons 0.20.0

I will update the requirements.txt file shortly. Thanks for pointing it out!

@Utkarsh-quytech
Copy link
Author

Ok, this is my current environment, and everything works:

Package Version

absl-py 1.4.0 joblib 1.2.0 matplotlib 3.7.1 mpose 1.2 numpy 1.20.3 optuna 3.2.0 pandas 2.0.1 PyYAML 6.0 scikit-learn 1.3.2 scipy 1.10.1 tensorboard 2.10.1 tensorflow 2.10.0 tensorflow-addons 0.20.0

I will update the requirements.txt file shortly. Thanks for pointing it out!

Thanks a lot!!

@Utkarsh-quytech
Copy link
Author

Sorry for the inconvenience but even after installing the dependencies there is following error

UserWarning:

TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).

For more information see: tensorflow/addons#2807

warnings.warn(
Traceback (most recent call last):
File "/home/utkarsh/Documents/Utkarsh.Singh_OLD_System_DATA/Utkarsh/PoseTracking/AcT/main.py", line 38, in
tf.config.experimental.set_visible_devices(gpus[config['GPU']], 'GPU')
IndexError: list index out of range

Ok, this is my current environment, and everything works:

Package Version

absl-py 1.4.0 joblib 1.2.0 matplotlib 3.7.1 mpose 1.2 numpy 1.20.3 optuna 3.2.0 pandas 2.0.1 PyYAML 6.0 scikit-learn 1.3.2 scipy 1.10.1 tensorboard 2.10.1 tensorflow 2.10.0 tensorflow-addons 0.20.0

I will update the requirements.txt file shortly. Thanks for pointing it out!

@simoneangarano
Copy link
Member

It's just a warning, ignore it for now.

@Utkarsh-quytech
Copy link
Author

Utkarsh-quytech commented Mar 1, 2024

This is the complete output of the warning
(act) utkarsh@H4CK3R:~/Documents/Utkarsh.Singh_OLD_System_DATA/Utkarsh/PoseTracking/AcT$ python main.py -b
/home/utkarsh/anaconda3/envs/act/lib/python3.9/site-packages/tensorflow_addons/utils/tfa_eol_msg.py:23: UserWarning:

TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).

For more information see: tensorflow/addons#2807

warnings.warn(
Traceback (most recent call last):
File "/home/utkarsh/Documents/Utkarsh.Singh_OLD_System_DATA/Utkarsh/PoseTracking/AcT/main.py", line 38, in
tf.config.experimental.set_visible_devices(gpus[config['GPU']], 'GPU')
IndexError: list index out of range
(act) utkarsh@H4CK3R:~/Documents/Utkarsh.Singh_OLD_System_DATA/Utkarsh/PoseTracking/AcT$ python main.py -t
/home/utkarsh/anaconda3/envs/act/lib/python3.9/site-packages/tensorflow_addons/utils/tfa_eol_msg.py:23: UserWarning:

TensorFlow Addons (TFA) has ended development and introduction of new features.
TFA has entered a minimal maintenance and release mode until a planned end of life in May 2024.
Please modify downstream libraries to take dependencies from other repositories in our TensorFlow community (e.g. Keras, Keras-CV, and Keras-NLP).

For more information see: tensorflow/addons#2807

warnings.warn(
Traceback (most recent call last):
File "/home/utkarsh/Documents/Utkarsh.Singh_OLD_System_DATA/Utkarsh/PoseTracking/AcT/main.py", line 38, in
tf.config.experimental.set_visible_devices(gpus[config['GPU']], 'GPU')
IndexError: list index out of range

What is the step to get inference of the final output of the model on our video??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants