Skip to content

Commit eb31853

Browse files
response changes
1 parent 3da5143 commit eb31853

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

singlestoredb/fusion/handlers/models.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,10 @@ def run(self, params: Dict[str, Any]) -> Optional[FusionSQLResult]:
285285
operation_result = inference_api.start()
286286

287287
res = FusionSQLResult()
288-
res.add_field('Model', result.STRING)
289288
res.add_field('Status', result.STRING)
290289
res.add_field('Message', result.STRING)
291290
res.set_rows([
292291
(
293-
operation_result.name,
294292
operation_result.status,
295293
operation_result.get_message(),
296294
),
@@ -335,12 +333,10 @@ def run(self, params: Dict[str, Any]) -> Optional[FusionSQLResult]:
335333
operation_result = inference_api.stop()
336334

337335
res = FusionSQLResult()
338-
res.add_field('Model', result.STRING)
339336
res.add_field('Status', result.STRING)
340337
res.add_field('Message', result.STRING)
341338
res.set_rows([
342339
(
343-
operation_result.name,
344340
operation_result.status,
345341
operation_result.get_message(),
346342
),

singlestoredb/management/inference_api.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)