Hi,
I tested the Keras+Tensorflow capabilities of KNIME 3.5 last week and found them very good. After updating to KNIME 3.6 I try to use (again) the example like “01_Classify_images_using_InceptionV3” but get the following errors:
WARN Keras Network Reader 2:17 Selected Keras back end ‘Keras (TensorFlow)’ is not available anymore. Please check your local installation.
Details: Deep learning Python back end installation tests failed for unknown reasons.
Further output: Traceback (most recent call last):
File “C:\apps\knime\plugins\org.knime.dl.keras_3.6.0.v201807091039\py\DLKerasTensorFlowNetworkTester.py”, line 57, in
test()
File “C:\apps\knime\plugins\org.knime.dl.keras_3.6.0.v201807091039\py\DLKerasTensorFlowNetworkTester.py”, line 54, in test
import DLKerasTensorFlowNetworkType
File “C:\apps\knime\plugins\org.knime.dl.keras_3.6.0.v201807091039\py\DLKerasTensorFlowNetworkType.py”, line 51, in
from DLKerasNetworkType import DLKerasNetworkType
File “C:\apps\knime\plugins\org.knime.dl.keras_3.6.0.v201807091039\py\DLKerasNetworkType.py”, line 53, in
from DLPythonNetworkType import DLPythonNetworkType
ModuleNotFoundError: No module named ‘DLPythonNetworkType’
Reinstallaling the extensions does not solve the problem…
I also checked the python backend (recent anaconda3 with python3.6) by using (old) KNIME 3.5.3 with the same python backend. It does work. So the problem seems to be in the combination KNIME 3.6.0<->Python<->Keras plugin
I think something went wrong when you updated from KNIME 3.5 to 3.6.
I tried to run the example workflow using a downloaded (not updated) copy of KNIME 3.6, which worked fine. So maybe downloading a fresh KNIME 3.6 would be the easiest workaround if that’s an option.
The ModuleNotFound error you got refers to a KNIME internal Python module, so this should not depend on Anaconda or the Python version. It could also suggest that your PYTHONPATH got messed up for some reason.
Could you please post your PYTHONPATH to help solving this issue? You can do that by adding a Python Source or DL Python Network Creator node to any workflow and executing the following script inside its node dialog:
import sys print(sys.path)
The PYTHONPATH is then displayed in the console view.
I tried fresh knime 3.5 and knime 3.6 zip-extractions with new anaconda enviroments with python 3.5 and 3.6 and the packages (and versions) mentioned in https://www.knime.com/deeplearning and also new workspaces.
WARN PythonKernel Using TensorFlow backend.
WARN PythonKernel 2018-07-18 13:12:48.014345: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX
But other Keras/Networking nodes show real errors.
I am sorry for the inconvenience. Thank you very much for your help!
Your PYTHONPATH and list of Python packages look good.
Can you check if the file “C:\apps\knime\plugins\org.knime.dl.python_3.6.0.v201806290954\py\DLPythonNetworkType.py” actually exists? And if yes, can you temporarily disable all running antivirus software and start KNIME as administrator and see if the problem persists? I just want to make sure that we rule out any file access problems before digging deeper.
This suggests that the problem is probably not between Keras and TensorFlow as such (or the file system etc.) but likely on our integration side. To give you some technical details/show you into which direction we’ll debug:
The “KNIME Deep Learning - Keras Integration” extension internally depends on another extension called “KNIME Deep Learning - Python Backend” (which itself depends on the “KNIME Python Integration” extension). The installation test that failed for you is carried out by the Keras extension using an external Python process. It therefore uses functionality from both the Python extension and the deep learning Python extension. The error “ModuleNotFoundError: No module named ‘DLPythonNetworkType’” suggests that the deep learning Python extension was not yet completely loaded when the installation test of the Keras extension started. Usually, this should not happen due to the way KNIME extensions are loaded but - in combination with the external Python process - we might have found a corner case.
If that’s really the problem, then there’s not much you could try to do, unfortunately . I’ll keep you posted about our progress.
Sorry for the troubles and thanks, again, for your investigations!
I cannot find a “KNIME Deep Learning - Python Backend” extension neither as binary or source version. I made two screenshots of the available and installed extensions…
The “KNIME Deep Learning - Python Backend” extension cannot be installed on its own but is implicitly installed when installing the Keras extension. You can verify that it’s there via Help > About KNIME Analytics Platform > Installation Details > Plug-ins. It should be present in the list (column Plug-in Name).
Yes, there is a dependency system that makes sure that all dependencies of an extension are properly resolved (see above).
@spider we’ve just pushed a fix on our nightly build (which should be available tomorrow morning). Would you mind quickly testing if our fix resolves your problem on your windows machine? We can’t really reproduce the problem locally.
KNIME 3.6.1 will be released soon. I can’t specify a more precise timeline, unfortunately.
Older versions of the plugins should be affected by the same bug, I don’t think changing back to them would help. In general, you can get old KNIME downloads and update sites here: https://www.knime.com/download-previous-versions.