PC crash when Keras Network Learner tries to launch Python through conda

Hi,

I am trying to run a keras DL network in KNIME. I used KNIME to create a compatible GPU conda environment and it was successfully tested in the preferences window.
I then tried to run the Keras Network Learner node but after loading data into the node my computer crashed (I guess when it was to run the conda environment). Here is the records from KNIME log:

2021-01-22 02:32:21,935 : ERROR : KNIME-Worker-2-Keras Network Learner 0:21 : : Node : Keras Network Learner : 0:21 : Execute failed: An error occurred while trying to launch Python: The external Python process crashed for unknown reasons while KNIME set up the Python environment. See log for details.
java.io.IOException: An error occurred while trying to launch Python: The external Python process crashed for unknown reasons while KNIME set up the Python environment. See log for details.
at org.knime.dl.keras.base.portobjects.DLKerasUnmaterializedPortObjectContent.materialize(DLKerasUnmaterializedPortObjectContent.java:120)
at org.knime.dl.keras.base.portobjects.DLKerasUnmaterializedNetworkPortObject.getNetwork(DLKerasUnmaterializedNetworkPortObject.java:128)
at org.knime.dl.keras.base.portobjects.DLKerasUnmaterializedNetworkPortObject.getNetwork(DLKerasUnmaterializedNetworkPortObject.java:1)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.executeInternal(DLKerasLearnerNodeModel.java:642)
at org.knime.dl.keras.base.nodes.learner.DLKerasLearnerNodeModel.execute(DLKerasLearnerNodeModel.java:321)
at org.knime.core.node.NodeModel.executeModel(NodeModel.java:576)
at org.knime.core.node.Node.invokeFullyNodeModelExecute(Node.java:1245)
at org.knime.core.node.Node.execute(Node.java:1025)
at org.knime.core.node.workflow.NativeNodeContainer.performExecuteNode(NativeNodeContainer.java:558)
at org.knime.core.node.exec.LocalNodeExecutionJob.mainExecute(LocalNodeExecutionJob.java:95)
at org.knime.core.node.workflow.NodeExecutionJob.internalRun(NodeExecutionJob.java:201)
at org.knime.core.node.workflow.NodeExecutionJob.run(NodeExecutionJob.java:117)
at org.knime.core.util.ThreadUtils$RunnableWithContextImpl.runWithContext(ThreadUtils.java:334)
at org.knime.core.util.ThreadUtils$RunnableWithContext.run(ThreadUtils.java:210)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.knime.core.util.ThreadPool$MyFuture.run(ThreadPool.java:123)
at org.knime.core.util.ThreadPool$Worker.run(ThreadPool.java:246)
Caused by: org.knime.dl.core.DLInvalidEnvironmentException: An error occurred while trying to launch Python: The external Python process crashed for unknown reasons while KNIME set up the Python environment. See log for details.
at org.knime.dl.python.core.DLPythonAbstractContext.createKernel(DLPythonAbstractContext.java:253)
at org.knime.dl.python.core.DLPythonAbstractContext.getKernel(DLPythonAbstractContext.java:122)
at org.knime.dl.python.core.DLPythonAbstractContext.executeInKernel(DLPythonAbstractContext.java:168)
at org.knime.dl.python.core.DLPythonAbstractCommands.getContext(DLPythonAbstractCommands.java:223)
at org.knime.dl.keras.core.layers.DLKerasNetworkMaterializer.materialize(DLKerasNetworkMaterializer.java:182)
at org.knime.dl.keras.base.portobjects.DLKerasUnmaterializedPortObjectContent.materialize(DLKerasUnmaterializedPortObjectContent.java:109)
… 17 more
Caused by: org.knime.python2.kernel.PythonIOException: The external Python process crashed for unknown reasons while KNIME set up the Python environment. See log for details.
at org.knime.python2.kernel.PythonKernel.(PythonKernel.java:294)
at org.knime.python2.kernel.PythonKernelQueue$KeyedPooledPythonKernelFactory.createKernel(PythonKernelQueue.java:351)
at org.knime.python2.kernel.PythonKernelQueue$KeyedPooledPythonKernelFactory.populateHolder(PythonKernelQueue.java:344)
at org.knime.python2.kernel.PythonKernelQueue$KeyedPooledPythonKernelFactory.makeObject(PythonKernelQueue.java:327)
at org.knime.python2.kernel.PythonKernelQueue$KeyedPooledPythonKernelFactory.makeObject(PythonKernelQueue.java:1)
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.create(GenericKeyedObjectPool.java:1051)
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:347)
at org.apache.commons.pool2.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:270)
at org.knime.python2.kernel.PythonKernelQueue.dequeueHolder(PythonKernelQueue.java:244)
at org.knime.python2.kernel.PythonKernelQueue.getNextKernelInternal(PythonKernelQueue.java:228)
at org.knime.python2.kernel.PythonKernelQueue.getNextKernel(PythonKernelQueue.java:144)
at org.knime.dl.python.core.DLPythonAbstractContext.createKernel(DLPythonAbstractContext.java:247)
… 22 more
Caused by: java.util.concurrent.ExecutionException: java.net.SocketTimeoutException: Accept timed out
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.knime.python2.kernel.PythonKernel.(PythonKernel.java:288)
… 33 more
Caused by: java.net.SocketTimeoutException: Accept timed out
at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
at java.net.DualStackPlainSocketImpl.socketAccept(DualStackPlainSocketImpl.java:135)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:199)
at java.net.ServerSocket.implAccept(ServerSocket.java:560)
at java.net.ServerSocket.accept(ServerSocket.java:528)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

I tried a couple of times and it happened every time. Any suggestions to resolve the issue?

Best,
Behrooz

Hi @behrooz12,

I’m not really sure what the issue is here, but since you are trying to use GPU, I’d recommend installing the latest driver for your GPU.
Usually when setting up the conda environment in KNIME, dependencies like Cuda and cuDNN are included, but it might make sense to install them on your own:


Best,

Julian

Thanks Julian. I will try that and get back to you.
Do I have to install a specific version of CUDA and cuDNN or any version should work?

I rechecked and installing CUDA and cuDNN should not be needed, but you can try it as last resort.
The documentation (https://docs.knime.com/2020-12/deep_learning_installation_guide/index.html#keras-integration) says 10.1 for CUDA and 7.4.2 or higher for cuDNN.

However, I would first try setting up a conda environment manually for Keras as described in the provided link. It seems that there are some issues regarding the automatic creation of an environment from inside KNIME.

It looks like it has nothing to do with KNIME. I tried to run a DL network on GPU directly in python and my PC crashed again. There should be some incompatibility between my GPU and python/conda installation.

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.