@@ -50,7 +50,7 @@ def from_start_response(cls, response: Dict[str, Any]) -> 'ModelOperationResult'
5050
5151 """
5252 return cls (
53- name = response .get ('modelID ' , '' ),
53+ name = response .get ('modelName ' , '' ),
5454 status = 'Initializing' ,
5555 hosting_platform = response .get ('hostingPlatform' , '' ),
5656 )
@@ -242,11 +242,7 @@ def start(self, model_name: str) -> ModelOperationResult:
242242 if self ._manager is None :
243243 raise ManagementError (msg = 'Manager not initialized' )
244244 res = self ._manager ._post (f'inferenceapis/{ model_name } /start' )
245- response_data = res .json ()
246- # Debug: print the actual response to see what we're getting
247- import json
248- print (f"DEBUG - Start response: { json .dumps (response_data , indent = 2 , default = str )} " )
249- return ModelOperationResult .from_start_response (response_data )
245+ return ModelOperationResult .from_start_response (res .json ())
250246
251247 def stop (self , model_name : str ) -> ModelOperationResult :
252248 """
@@ -266,8 +262,4 @@ def stop(self, model_name: str) -> ModelOperationResult:
266262 if self ._manager is None :
267263 raise ManagementError (msg = 'Manager not initialized' )
268264 res = self ._manager ._post (f'inferenceapis/{ model_name } /stop' )
269- response_data = res .json ()
270- # Debug: print the actual response to see what we're getting
271- import json
272- print (f"DEBUG - Stop response: { json .dumps (response_data , indent = 2 , default = str )} " )
273- return ModelOperationResult .from_stop_response (response_data )
265+ return ModelOperationResult .from_stop_response (res .json ())
0 commit comments