nilmtk / nilmtk-contrib

Apache License 2.0
114 stars 59 forks source link

Installation issue: keras - tensorflow #86

Open olarraUPC opened 3 months ago

olarraUPC commented 3 months ago

Hi,

After succesfully installing nilm-contrib I am trying to run an experiment using the Seq2Point disaggregation algorithm.

When I do this an error pops up saying I am missing teensorflow. If I try to install it this leads to more errors.

Although it would seem that the Seq2Point algorithm does not use tensorflow, the version of keras it uses calls tensorflow.

I already tried installing different versions of keras but there are always compatibility isuues.

I have tried every method I could think of (including the responses provided in other issues) and nothing seems to work.

I installed through anaconda, through pip, tried different versions of python, keras, tensorflow, numpy... etc.... I tried offline installation and nothing

Can someone help me please? Or is this package still workable?

Thanks a lot!

nipunbatra commented 3 months ago

We are looking to upgrade to a torch based implementation. It should happen soon. Will put some details out in coming days.

olarraUPC commented 3 months ago

We are looking to upgrade to a torch based implementation. It should happen soon. Will put some details out in coming days.

great, but in the meantime is there anyway to make it work as it is?

arnav177 commented 3 months ago

86

Here are a few suggestions that might help resolve the issue:

Create a Fresh Environment: Sometimes, conflicts arise due to residual dependencies from previous installations. Try creating a new, clean environment using Anaconda:

conda create --name nilm-env python=3.12 conda activate nilm-env

Install TensorFlow and Keras in a Specific Order: Ensure compatibility by installing specific versions of TensorFlow and Keras. For example: conda install tensorflow=2.10 keras=3.3.3

Check for nilm-contrib Dependencies: Make sure you have all the necessary dependencies for nilm-contrib installed. Sometimes, missing or outdated dependencies can cause issues. pip install -r requirements.txt

Verify Installation: After setting up the environment, verify that TensorFlow and Keras are correctly installed and compatible:

import tensorflow as tf import keras print(tf.version) print(keras.version)

olarraUPC commented 3 months ago

86 Here are a few suggestions that might help resolve the issue:

Create a Fresh Environment: Sometimes, conflicts arise due to residual dependencies from previous installations. Try creating a new, clean environment using Anaconda:

conda create --name nilm-env python=3.13 conda activate nilm-env

Install TensorFlow and Keras in a Specific Order: Ensure compatibility by installing specific versions of TensorFlow and Keras. For example: conda install tensorflow=2.16 keras=3.3.3

Check for nilm-contrib Dependencies: Make sure you have all the necessary dependencies for nilm-contrib installed. Sometimes, missing or outdated dependencies can cause issues. pip install -r requirements.txt

Verify Installation: After setting up the environment, verify that TensorFlow and Keras are correctly installed and compatible:

import tensorflow as tf import keras print(tf.version) print(keras.version)

Thanks for your reply @arnav177 , Python version 3.13 is programmed to be released in October this year and the latest version of tensorflow available from conda is 2.10.0.

Can you give me some feedback on this please?

Thanks a lot!

olarraUPC commented 3 months ago

86 Here are a few suggestions that might help resolve the issue:

Create a Fresh Environment: Sometimes, conflicts arise due to residual dependencies from previous installations. Try creating a new, clean environment using Anaconda:

conda create --name nilm-env python=3.12 conda activate nilm-env

Install TensorFlow and Keras in a Specific Order: Ensure compatibility by installing specific versions of TensorFlow and Keras. For example: conda install tensorflow=2.10 keras=3.3.3

Check for nilm-contrib Dependencies: Make sure you have all the necessary dependencies for nilm-contrib installed. Sometimes, missing or outdated dependencies can cause issues. pip install -r requirements.txt

Verify Installation: After setting up the environment, verify that TensorFlow and Keras are correctly installed and compatible:

import tensorflow as tf import keras print(tf.version) print(keras.version)

@arnav177 do you have any other advice please?

best regards

Oscar

olarraUPC commented 2 months ago

We are looking to upgrade to a torch based implementation. It should happen soon. Will put some details out in coming days.

any news @nipunbatra ?

olarraUPC commented 2 months ago

86 Here are a few suggestions that might help resolve the issue:

Create a Fresh Environment: Sometimes, conflicts arise due to residual dependencies from previous installations. Try creating a new, clean environment using Anaconda: conda create --name nilm-env python=3.13 conda activate nilm-env Install TensorFlow and Keras in a Specific Order: Ensure compatibility by installing specific versions of TensorFlow and Keras. For example: conda install tensorflow=2.16 keras=3.3.3 Check for nilm-contrib Dependencies: Make sure you have all the necessary dependencies for nilm-contrib installed. Sometimes, missing or outdated dependencies can cause issues. pip install -r requirements.txt Verify Installation: After setting up the environment, verify that TensorFlow and Keras are correctly installed and compatible: import tensorflow as tf import keras print(tf.version) print(keras.version)

Thanks for your reply @arnav177 , Python version 3.13 is programmed to be released in October this year and the latest version of tensorflow available from conda is 2.10.0.

Can you give me some feedback on this please?

Thanks a lot!

any other advice @arnav177 still haven't manage to install it

olarraUPC commented 1 week ago

We are looking to upgrade to a torch based implementation. It should happen soon. Will put some details out in coming days.

any news @nipunbatra ?