hualos
hualos copied to clipboard
Warning: could not reach RemoteMonitor root server
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')
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!
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