keplr-io / quiver

Interactive convnet features visualization for Keras
https://keplr-io.github.io/quiver/
MIT License
1.76k stars 223 forks source link

404 error #2

Closed j-zarp closed 7 years ago

j-zarp commented 7 years ago

Hi,

Thanks for sharing your tool. Unfortunately, I cannot make it work properly, whenever the server is running, it seems to be idle and navigating to localhost: gives me a 404 not found error (so the server responds but there is nothing to display).

Any thoughts? Thank you!

Here is a sample of the code that creates the issue:

from __future__ import print_function
import numpy as np
import h5py

from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Flatten
from keras.layers import Convolution2D, MaxPooling2D

# input image dimensions
img_rows, img_cols = 28, 28
# number of convolutional filters to use
nb_filters = 32
# size of pooling area for max pooling
pool_size = (2, 2)
# convolution kernel size
kernel_size = (3, 3)

nb_classes = 10

model = Sequential()
input_shape = (1,img_rows, img_cols)

model.add(Convolution2D(nb_filters, kernel_size[0], kernel_size[1],
                        border_mode='valid', activation='relu',
                        input_shape=input_shape))
model.add(Convolution2D(nb_filters, kernel_size[0], kernel_size[1], activation='relu'))
model.add(MaxPooling2D(pool_size=pool_size))
model.add(Dropout(0.25))

model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(nb_classes, activation='softmax'))

model.compile(loss='categorical_crossentropy',
              optimizer='adadelta',
              metrics=['accuracy'])

model.load_weights('MNIST_weights.h5')

# launching the visualization server
from quiver_engine import server
server.launch(model, temp_folder='./tmp', input_folder='./', port=7777)

and here is the output of this script:

(tsflow) jeremie@jeremie-OptiPlex-9020:~/test$ python test.py 
Using TensorFlow backend.
127.0.0.1 - - [2016-11-14 17:51:54] "GET / HTTP/1.1" 404 374 0.005049
127.0.0.1 - - [2016-11-14 17:51:59] "GET / HTTP/1.1" 404 374 0.000828
127.0.0.1 - - [2016-11-14 17:52:01] "GET / HTTP/1.1" 404 374 0.000582
jakebian commented 7 years ago

Can you paste the log from the terminal?

j-zarp commented 7 years ago

I just updated the original post

jakebian commented 7 years ago

Oops I see the issue - setup.py is not correctly uploading the built dashboard to the pypi repo, so the dashboard files are missing if you install using pip, sorry!

While I work on restoring that, try cloning the repo and running the dashboard per the instruction under "Development" in the readme.

jakebian commented 7 years ago

updated the pypi package, do a pip upgrade and lemme know if it works!

alexio777 commented 7 years ago

Hello. Have same error. Installed by pip.

Using TensorFlow backend. I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally I tensorflow/core/common_runtime/gpu/gpu_device.cc:951] Found device 0 with properties: name: GeForce GTX 1070 major: 6 minor: 1 memoryClockRate (GHz) 1.7845 pciBusID 0000:06:00.0 Total memory: 7.92GiB Free memory: 7.08GiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:972] DMA: 0 I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] 0: Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:1041] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:06:00.0) Created new window in existing browser session. 127.0.0.1 - - [2016-11-15 07:30:48] "GET / HTTP/1.1" 404 374 0.013343

npm install failed:

npm WARN optional Skipping failed optional dependency /chokidar/fsevents: npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.15 npm WARN halogen@0.2.0 requires a peer of react@^0.14.8 but none was installed. npm WARN halogen@0.2.0 requires a peer of react-dom@^0.14.8 but none was installed. npm ERR! Linux 4.8.0-27-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v4.2.6 npm ERR! npm v3.5.2 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn

jakebian commented 7 years ago

@zulmaster

alexio777 commented 7 years ago

Name: quiver-engine Version: 0.1.3.1 Summary: Interactive per-layer visualization for convents in keras Home-page: UNKNOWN Author: Jake Bian Author-email: jake@keplr.io License: mit Location: /usr/local/lib/python2.7/dist-packages Requires: pillow, flask, keras, numpy, gevent, flask-cors

ok

j-zarp commented 7 years ago

Same for me unfortunately, I still have the 404 error with quiver-engine version 0.1.3.1 and the same npm error during the install from the repo.

varoudis commented 7 years ago

same here: 10.200.200.14 - - [2016-11-15 10:41:28] "GET / HTTP/1.1" 404 342 0.004962 10.200.200.14 - - [2016-11-15 10:41:30] "GET / HTTP/1.1" 404 342 0.001274

Im building from source with python setup.py develop

kretes commented 7 years ago

I have the same issue - I've put up a really minimalistic docker file to start quiver: https://gist.github.com/kretes/44734faaac63a04c8214976292aff2d6 and have 404 when going to localhost:5000

jakebian commented 7 years ago

Thanks all for your patience, pushed a fix and this time verified on my machine that it works with a clean install. Let me know if there are any more issues!

kretes commented 7 years ago

Hmm unfortunately I cannot get this to run, or maybe I miss something about setting up quiver from master?

My setup is fully reproducable in docker: https://gist.github.com/kretes/44734faaac63a04c8214976292aff2d6

there is a Dockerfile with my installation instructions and example python script I run in the docker container.

I can connect to localhost:5000 but I get 404 which is confirmed in server logs. any help on that?

kretes commented 7 years ago

Ok I still cannot install the product from git but installing from pip works now (at least I see UI at 5000)

jakebian commented 7 years ago

Great. What do you mean you cannot install from git?

kretes commented 7 years ago

doing those steps:

FROM continuumio/miniconda

RUN pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0-cp27-none-linux_x86_64.whl

RUN pip install h5py

RUN apt-get install -y git

RUN git clone  https://github.com/jakebian/quiver.git

RUN apt-get install -y libjpeg62-turbo-dev gcc

RUN pip install keras flask flask_cors gevent numpy pillow

RUN cd quiver && python setup.py develop

and running simple server still gave me 404 ...

jakebian commented 7 years ago

Ah yes, as mentioned in the readme, if you want to run it locally with setup.py, you need to either compile the dashboard (npm run deploy:prod) or run it in development mode (npm start).

jakebian commented 7 years ago

Sounds like this is solved, closing