Closed Kacawi-zz closed 6 years ago
@Kacawi can you provide me with the exact code that is failing? That way I don't have to reverse-engineer that from the DCL chunks.
@filipsch I can try to see if I can find the code back but I'm fairly unoptimistic about that one since there wasn't any version control. Nevertheless, I wanted to add to the original issue that I also see the following in some cases:
Error: Python module keras was not found.
Detected Python configuration:
python: /usr/bin/python
libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
pythonhome: /usr:/usr
version: 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
numpy: /usr/local/lib/python2.7/dist-packages/numpy
numpy_version: 1.14.2
keras: [NOT FOUND]
I will try to see if I can update this issue with the exact code that is failing but it seems to go wrong already at the import.
I remember that the installation of the R keras
package was a difficult one because Keras is a wrapper on TensorFlow and you had to do some magic to get that to work with R. I think the issue is related to that.
@Kacawi I managed to find a chunk of code that is not working:
library(keras)
iris <- read.csv(url("http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"), header = FALSE)
names(iris) <- c("Sepal.Length", "Sepal.Width", "Petal.Length", "Petal.Width", "Species")
iris[,5] <- as.numeric(iris[,5]) -1
iris <- as.matrix(iris)
dimnames(iris) <- NULL
ind <- sample(2, nrow(iris), replace=TRUE, prob=c(0.67, 0.33))
iris.training <- iris[ind==1, 1:4]
iris.test <- iris[ind==2, 1:4]
iris.trainingtarget <- iris[ind==1,5]
iris.testtarget <- iris[ind==2, 5]
iris.trainLabels <- to_categorical(iris.trainingtarget)
iris.testLabels <- to_categorical(iris.testtarget)
model <- keras_model_sequential()
model %>%
layer_dense(units = 8, activation = 'relu', input_shape = c(4)) %>%
layer_dense(units = 3, activation = 'softmax')
It goes wrong in the iris.testLabels <- to_categorical(iris.testtarget)
step, with this error:
Error: Python module keras was not found.
Detected Python configuration:
python: /usr/bin/python
libpython: /usr/lib/python2.7/config-x86_64-linux-gnu/libpython2.7.so
pythonhome: /usr:/usr
version: 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
numpy: /usr/local/lib/python2.7/dist-packages/numpy
numpy_version: 1.14.2
keras: [NOT FOUND]
I'll look into it as soon as I find the time.
@Kacawi A fix is deployed. The Docker image is now rebuilding, which can take quite some time. I'll keep an eye on it, and is soon as it finished, I'll check again if it works properly this time, and activate afterwards. I'll keep you posted.
@Kacawi should be good now
Still not working. Continuing to investigate.
@Kacawi A fix is deployed. The Docker image is now rebuilding, which can take quite some time. I'll keep an eye on it, and is soon as it finished, I'll check again if it works properly this time, and activate afterwards. I'll keep you posted. 😉
@filipsch Thanks a lot!!
@Kacawi should be up. Can you verify and close if it works?
@Kacawi confirmed it works.
Hmm, tried it today still not working ...
The Issue
I get the following error messages from the DataCamp Light chunks that are embedded in this
keras
R tutorial:Reproduce?
You can reproduce the error by going to the tutorial and trying to run any of the chunks towards the end in which the Keras model is constructed.