karpathy / char-rnn

Multi-layer Recurrent Neural Networks (LSTM, GRU, RNN) for character-level language models in Torch
11.59k stars 2.58k forks source link

Train status web interface #141

Open whackashoe opened 8 years ago

whackashoe commented 8 years ago

This builds upon #82 and uses lua-websockets to have a websocket server running if -visualization flag is enabled (enabling also sets the port for which the server is to run). Instead of using files the initial data is sent when a connection is initiated, from there every time a client requests an update.. the info on page is updated.

I was not able to obtain as clean of a solution as I would have liked due to cross-boundary c-code issues when copas yields, the downside of this is we currently must call update on client side prior to receiving the data (whereas I had hoped to stream it with no need to request past initial connection). Perhaps in future this can be solved but someone more knowledgeable.

All dependencies on js/css side are also now local, in case user is not connected to internet.

All settings were default other than gpu while testing, it would probably be smart to check with gpu enabled for a few minutes just in case any magical bugs sprout from the depths of hell.

whackashoe commented 8 years ago

@karpathy any thoughts on this?

EricZeiberg commented 8 years ago

What is the downside of having the JS code request an update vs streaming directly to client?

Also, nice job. I had a hard time finding a way to use JSON since I'm less experienced with Lua, but you seemed to have solved the problem.

whackashoe commented 8 years ago

Slight overhead - isn't noticeable amount though. It's just unnecessary to have a request & response rather than streaming responses after handshake.