hualos icon indicating copy to clipboard operation
hualos copied to clipboard

Warning: could not reach RemoteMonitor root server

Open wsstriving opened this issue 8 years ago • 2 comments

Hello, When I use this tool, I always got an exception: Warning: could not reach RemoteMonitor root server at 192.168.1.2:9000

Details: I ran the python api.py on the machine with ip 192.168.1.2, and the server started normally, And then run the model training on the other machine (with gpu, but no monitor), by calling callback: remote = RemoteMonitor(root='192.168.1.2:9000')

wsstriving avatar Jan 13 '17 03:01 wsstriving

Hi, @wsstriving , the warning comes from keras.callbacks.py:RemoteMonitor:on_epoch_end(), as shown in the following:

  ...

  def on_epoch_end(self, epoch, logs={}):
    import requests
    send = {}
    send['epoch'] = epoch
    for k, v in logs.items():
        send[k] = v
    try:
        requests.post(self.root + self.path,
                      {self.field: json.dumps(send)},
                      headers=self.headers)
    except:
        print('Warning: could not reach RemoteMonitor '
              'root server at ' + str(self.root))
  ...

It seems that an exception is raised when the requests tries to post JSON data, but it is not clear which triggered this exception, maybe network connection, maybe data formats or other stuffs. So, just remove the try...catch... block and try again, to see what exception it throws.

Hopes to help!

bigben-plusplus avatar Jan 17 '17 10:01 bigben-plusplus

Hi @wsstriving

It works for me when running it locally in virtual env. I noticed that your missing the method when you call it. Try using it with:

remote = callbacks.RemoteMonitor()

Also, reference remote in model.fit(). Hope it works.

Amrit

AmritRaj23 avatar Feb 09 '17 15:02 AmritRaj23