@@ -48,11 +48,13 @@ def __init__(
48
48
f"result_polling_interval: { self .result_polling_interval } timeout: { self .timeout } "
49
49
)
50
50
51
- _utils .logger .info (f"""fastDeploy configuration:
51
+ _utils .logger .info (
52
+ f"""fastDeploy configuration:
52
53
result_polling_interval: { self .result_polling_interval }
53
54
timeout: { self .timeout }
54
55
allow_pickle: { self .allow_pickle }
55
- """ )
56
+ """
57
+ )
56
58
57
59
@property
58
60
def _compressor (self ):
@@ -75,7 +77,9 @@ def _decompressor(self):
75
77
def read_inputs (self , unique_id , inputs , input_type , is_compressed ):
76
78
if input_type == "pickle" :
77
79
if not self .allow_pickle :
78
- _utils .logger .warning (f"{ unique_id } : tried to use pickle input, but pickle is disallowed" )
80
+ _utils .logger .warning (
81
+ f"{ unique_id } : tried to use pickle input, but pickle is disallowed"
82
+ )
79
83
raise Exception ("pickle input disallowed, use msgpack or json" )
80
84
81
85
inputs = pickle .loads (
@@ -127,11 +131,7 @@ def create_response(self, unique_id, response, is_compressed, input_type):
127
131
return success , response
128
132
129
133
def infer (
130
- self ,
131
- inputs : bytes ,
132
- unique_id : str ,
133
- input_type : str ,
134
- is_compressed : bool
134
+ self , inputs : bytes , unique_id : str , input_type : str , is_compressed : bool
135
135
):
136
136
try :
137
137
request_received_at = time .time ()
@@ -234,7 +234,9 @@ def infer(
234
234
input_type ,
235
235
)
236
236
elif current_results ["last_predictor_success" ] is False :
237
- _utils .logger .warning (f"{ unique_id } : predictor failed at { current_results ['last_predictor_sequence' ]} " )
237
+ _utils .logger .warning (
238
+ f"{ unique_id } : predictor failed at { current_results ['last_predictor_sequence' ]} "
239
+ )
238
240
return self .create_response (
239
241
unique_id ,
240
242
{
@@ -252,7 +254,9 @@ def infer(
252
254
and self .timeout
253
255
and time .time () - request_received_at >= self .timeout
254
256
):
255
- _utils .logger .debug (f"{ unique_id } : predictor timedout at { current_results ['last_predictor_sequence' ]} " )
257
+ _utils .logger .debug (
258
+ f"{ unique_id } : predictor timedout at { current_results ['last_predictor_sequence' ]} "
259
+ )
256
260
return self .create_response (
257
261
unique_id ,
258
262
{
0 commit comments