Skip to content

Extract format_run_ids_display helper to eliminate duplicated run ID formatting logic#479

Draft
Copilot wants to merge 2 commits intomultinode_analysisfrom
copilot/sub-pr-463
Draft

Extract format_run_ids_display helper to eliminate duplicated run ID formatting logic#479
Copilot wants to merge 2 commits intomultinode_analysisfrom
copilot/sub-pr-463

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

The run ID display pattern (truncate list if longer than 3, show count otherwise) was duplicated in both analyze_environment_configurations and analyze_groups.

Changes

  • New helper format_run_ids_display(run_ids: list, max_display: int = 3) -> str extracted before fetch_wandb_runs
  • Both call sites replaced with a single print(f" Run IDs: {format_run_ids_display(run_ids)}")
def format_run_ids_display(run_ids: list, max_display: int = 3) -> str:
    """Format a list of run IDs for display, truncating if longer than max_display."""
    if len(run_ids) <= max_display:
        return str(run_ids)
    return f"{run_ids[:max_display]}... ({len(run_ids)} total)"

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: josephdviviano <4142570+josephdviviano@users.noreply.github.com>
Copilot AI changed the title [WIP] Make requested changes based on feedback to PR #463 Extract format_run_ids_display helper to eliminate duplicated run ID formatting logic Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants