remove changes from receptor
@@ -234,7 +234,7 @@ class Receptor(nn.Module):
start_time = clock.time()
zeros = nill_response_for(inputs)
- #try:
+ try:
# ---- Check inputs size ----
if torch.numel(inputs) == 0:
code = bittensor.proto.ReturnCode.EmptyRequest
@@ -389,13 +389,13 @@ class Receptor(nn.Module):
# ---- Safe catch NaNs and replace with 0.0 ----
outputs = torch.where(torch.isnan(outputs), torch.zeros_like(outputs), outputs)
- # # ---- Catch all ----
- # except Exception as e:
- # code = bittensor.proto.ReturnCode.UnknownException
- # message = 'exception in forward call: {}'.format(e)
- # call_time = clock.time() - start_time
- # bittensor.logging.rpc_log(axon=False, forward=True, is_response=True, code=code, call_time=call_time, pubkey=self.endpoint.hotkey, uid = self.endpoint.uid, inputs=list(inputs.shape), outputs=None, message=message)
- # return zeros, code, call_time, message
+ # ---- Catch all ----
+ except Exception as e:
+ code = bittensor.proto.ReturnCode.UnknownException
+ message = 'exception in forward call: {}'.format(e)
+ call_time = clock.time() - start_time
+ bittensor.logging.rpc_log(axon=False, forward=True, is_response=True, code=code, call_time=call_time, pubkey=self.endpoint.hotkey, uid = self.endpoint.uid, inputs=list(inputs.shape), outputs=None, message=message)
+ return zeros, code, call_time, message
# ---- Return ----
code = response.return_code
