@@ -291,20 +291,18 @@ def retrieve_and_print_run_details(
291291 """
292292 run = run_handle .details (hide_platform_queue_position = hide_platform_queue_position )
293293
294- if summarize :
295- _print_run_summary (run , run_handle )
296- else :
297- run_details = _format_run_details (run )
298- output = f"[bold]Run Details for { run .run_id } [/bold]\n { '=' * 80 } \n { run_details } \n \n [bold]Items:[/bold]"
299- console .print (output )
300- _retrieve_and_print_run_items (run_handle )
294+ run_details = _format_run_details (run )
295+ output = f"[bold]Run Details for { run .run_id } [/bold]\n { '=' * 80 } \n { run_details } \n \n [bold]Items:[/bold]"
296+ console .print (output )
297+ _retrieve_and_print_run_items (run_handle , summarize )
301298
302299
303- def _retrieve_and_print_run_items (run_handle : Run ) -> None :
300+ def _retrieve_and_print_run_items (run_handle : Run , summarize : bool = False ) -> None :
304301 """Retrieve and print information about items in a run.
305302
306303 Args:
307304 run_handle (Run): The Run handle
305+ summarize (bool): If True, show only status summary without output artifacts
308306 """
309307 results = run_handle .results ()
310308 if not results :
@@ -320,7 +318,7 @@ def _retrieve_and_print_run_items(run_handle: Run) -> None:
320318 f" [bold]Custom Metadata:[/bold] { item .custom_metadata or 'None' } "
321319 )
322320
323- if item .output_artifacts :
321+ if not summarize and item .output_artifacts :
324322 artifacts_output = "\n [bold]Output Artifacts:[/bold]"
325323 for artifact in item .output_artifacts :
326324 artifacts_output += (
@@ -334,54 +332,6 @@ def _retrieve_and_print_run_items(run_handle: Run) -> None:
334332 console .print (f"{ item_output } \n " )
335333
336334
337- def _print_run_summary (run : RunData , run_handle : Run ) -> None :
338- """Print a concise summary of run and item statuses.
339-
340- Shows only the essential status information: external ID, state, and error message
341- for each item, plus overall run statistics.
342-
343- Args:
344- run (RunData): Run data object
345- run_handle (Run): The Run handle for fetching item results
346- """
347- status_str = _format_status_string (run .state , run .termination_reason )
348- duration_str = _format_duration_string (run .submitted_at , run .terminated_at )
349-
350- # Run summary header
351- output = (
352- f"[bold]Run Summary for { run .run_id } [/bold]\n "
353- f"{ '=' * 80 } \n "
354- f"[bold]Application (Version):[/bold] { run .application_id } ({ run .version_number } )\n "
355- f"[bold]Status:[/bold] { status_str } \n "
356- f"[bold]Duration:[/bold] { duration_str } \n "
357- )
358-
359- if run .error_message or run .error_code :
360- output += f"[bold]Error:[/bold] { run .error_message or 'N/A' } ({ run .error_code or 'N/A' } )\n "
361-
362- output += f"[bold]Statistics:[/bold]\n { _format_run_statistics (run .statistics )} \n "
363- console .print (output )
364-
365- # Items summary
366- console .print ("[bold]Items:[/bold]" )
367- results = run_handle .results ()
368- if not results :
369- console .print (" No item results available." )
370- return
371-
372- for item in results :
373- item_status = _format_status_string (item .state , item .termination_reason )
374- item_line = f" [bold]{ item .external_id } [/bold]: { item_status } "
375-
376- if item .error_message or item .error_code :
377- error_info = item .error_message or item .error_code or ""
378- if item .error_message and item .error_code :
379- error_info = f"{ item .error_message } ({ item .error_code } )"
380- item_line += f" - [red]{ error_info } [/red]"
381-
382- console .print (item_line )
383-
384-
385335def print_runs_verbose (runs : list [RunData ]) -> None :
386336 """Print detailed information about runs, sorted by submitted_at in descending order.
387337
0 commit comments