Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got blank webpage #5

Open
sunshineatnoon opened this issue Mar 25, 2016 · 9 comments
Open

Got blank webpage #5

sunshineatnoon opened this issue Mar 25, 2016 · 9 comments

Comments

@sunshineatnoon
Copy link

Awesome project!
I use Keras 0.32 with theano backend and add the callback in model.fit_generator() function, but nothing appears on my webpage. Did I do anything wrong? I did get some messages on the command line:

127.0.0.1 - - [2016-03-25 17:00:22] "GET /static/js/c3.min.js HTTP/1.1" 304 191 0.000501
127.0.0.1 - - [2016-03-25 17:00:51] "GET / HTTP/1.1" 200 1717 0.000501
127.0.0.1 - - [2016-03-25 17:00:51] "GET /static/css/c3.min.css HTTP/1.1" 304 189 0.000677
127.0.0.1 - - [2016-03-25 17:00:51] "GET /static/js/d3.min.js HTTP/1.1" 304 191 0.000504
127.0.0.1 - - [2016-03-25 17:00:51] "GET /static/js/jquery.min.js HTTP/1.1" 304 188 0.000452
127.0.0.1 - - [2016-03-25 17:00:51] "GET /static/css/bootstrap.min.css HTTP/1.1" 304 191 0.000442
127.0.0.1 - - [2016-03-25 17:00:51] "GET /static/js/c3.min.js HTTP/1.1" 304 191 0.000434

I use firefox by the way. THX
image

@tjrileywisc
Copy link

I was seeing this as well, but if I use my ip address in the callback instead of 'localhost' the page loaded correctly. You should see something like this below if it's working:

image

@dxdoan
Copy link

dxdoan commented Jun 23, 2016

@sunshineatnoon : Any update on this? Did it work for you? I seem to have the same issue. Nothing shows up on the graph, although the model appears to do fine publishing data to the web server. I tried the solution suggested by @tjrileywisc, using the ip address in the callback instead of 'localhost', still got the blank page. Any advice on this? Appreciate any feedback as soon as you can. Thanks.

@tjrileywisc
Copy link

@dxdoan What browser are you using? If you bring up the browser's dev console (F12 I think in all browsers, you'll have to double check), do you see any errors listed there?

@dxdoan
Copy link

dxdoan commented Jun 24, 2016

@tjrileywisc I'm using Chrome. In the browser dev console's Network tab, besides the successful loads of js and css, I see a request for resource called end/ that's "pending" like forever, and it's requesting the URL http://192.168.99.100:9000/subscribe/epoch/end/ (192.168.99.100 is of course the IP of my virtual machine).

@dxdoan
Copy link

dxdoan commented Jun 26, 2016

@tjrileywisc I'm not sure if the problem is due to my model script and/or data itself. It runs over only 55 epoches, and it appears to complete them all fine. But right after that, the script encounters an exception. I'm not sure if the graph not showing up is because of this exception? I suspect not, because as soon as the script publishes some data to the server in each epoch (and it does that for the entire 55 epoches), that data should be available for the client to plot on the graph, right? The graph plots data live in basically real-time, right?

@dxdoan
Copy link

dxdoan commented Jun 28, 2016

Figured out the problem. In file api.py, line 35, the statement self.desc_map.iteritems() causes exception, since I use python 3. Changing it to self.desc_map.items() works.

@bigben-plusplus
Copy link

In my case, when I use the default header, i.e. headers={'Accept': 'application/json', 'Content-Type': 'application/json'}, I get a blank page too. But when I change the header to headers={'Accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded'}, things seem to get Okay. Can anybody can explain Why? THX

@cstraton
Copy link

@bigben-plusplus I just had same issues with headers. Not sure why it's happening, but seems to be a result of this commit. Mine also works if I just set headers to None when constructing new instance of RemoteMonitor. keras-team/keras@ad5e29a

@mez
Copy link

mez commented Feb 11, 2017

I am using python 3.5.2 and the fix that worked for me is as follow:
I created the remote callback with a header equal to None.
remote = RemoteMonitor(headers=None)

I updated the encode method in the api.py file to use items() instead of iteritems().
lines = ["%s: %s" % (v, k) for k, v in self.desc_map.items() if k]

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants