ret = backend.interface.communicate_run(run, timeout=30)
// TODO: fail on more errors, check return type
// TODO: make the backend log stacktraces on catostrophic failure
if ret.HasField("error"):
// Shutdown the backend and get rid of the logger
// we don"t need to do console cleanup at this point
backend.cleanup()
After Change
wandb.termlog(ret.message)
ret = backend.interface.communicate_run(run, timeout=30)
error_message = None
if not ret:
error_message = "Error communicating with backend"
if ret and ret.error:
error_message = ret.error.message
if error_message:
// Shutdown the backend and get rid of the logger