File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
pkg/workloads/cortex/onnx_serve Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ def get_signature(app_name, api_name):
219219
220220
221221def start (args ):
222+ api = None
222223 try :
223224 ctx = Context (s3_path = args .context , cache_dir = args .cache_dir , workload_id = args .workload_id )
224225 api = ctx .apis_id_map [args .api ]
@@ -240,11 +241,12 @@ def start(args):
240241 except CortexException as e :
241242 e .wrap ("error" )
242243 logger .error (str (e ))
243- logger .exception (
244- "An error occured starting the api, see `cx logs -v api {}` for more details" .format (
245- api ["name" ]
244+ if api is not None :
245+ logger .exception (
246+ "An error occured starting the api, see `cx logs -v api {}` for more details" .format (
247+ api ["name" ]
248+ )
246249 )
247- )
248250 sys .exit (1 )
249251
250252 serve (app , listen = "*:{}" .format (args .port ))
You can’t perform that action at this time.
0 commit comments