Let me give you some background first:
The Keras Network Learner node performs an integrity check on the Python environment it is supposed to use, before executing the actual model training. This is done to make sure that the required libraries (Keras, TensorFlow, etc.) are properly installed and their versions match the ones that KNIME supports.
This check times out after a certain duration to prevent the node from freezing in case of unexpected external circumstances (e.g., the Python process crashes).
The part “Installation test for Python back end […] timed out” in the error message you experience suggests that such timeout is exactly what happens in your case.
Given that, on the Python Deep Learning preference page in your recording, the steps “Testing Conda installation…”, “Collecting available environments…”, and “Testing Python environment…” take a very long time to complete, I would suspect that the reason for the timeout is that executing conda commands is slow on your machine. This is a known problem on some Windows machines (and presumably for specific Conda versions only) that we have also experienced on some of our internally used machines.
Here is what you can do:
First, try to check whether the problem really is on the Conda side.
- Open an Anaconda Prompt window. (You should be able to find Anaconda Prompt via the Windows Search/Start Menu if you are unsure where it is located.)
- Type in and run:
conda activate py3_knime_dl
- Wait for the above command to terminate. If this took a significant amount of time (multiple seconds or more) or the command behaved otherwise unexpectedly, it could be the reason why you experience these timeouts. If not, please let us know, then we will have to look for other possible error sources.
If it is indeed Conda being slow:
- Add the option
-Dknime.dl.installationtesttimeout=3600000 to your knime.ini file (on a new line at the very bottom of the file). You can find the knime.ini in your KNIME installation directory. The option increases the timeout of the integrity check to one hour (3,600,000 milliseconds).
- Restart KNIME
- Try to rerun your workflow. The Keras learner node will now be stuck at “Copying input object at port 1” even longer (up to an hour, see above) since that is when the check is carried out.
- If, after that, the node continues to execute, we have successfully worked around the problem. If not, again, please let us know.
The above is of course just a workaround and waiting for the node to execute for minutes is not ideal. So furthermore you could try to:
- Temporarily deactivate all antivirus software on your computer (including Windows Defender) and see if this improves things. You do this at your own risk, however. This is not a permanent solution but should only be done once to gain more insight into the problem. If it helped, you may want to consider adding exceptions for Conda to the antivirus programs’ filters. Again, at your own risk.
- Downgrade Conda to version 4.7.12. In our experience, this version turned out to work well on some Windows machines on which we previously experienced the problem at hand.