Skip to content

Conversation

@atihkin
Copy link
Contributor

@atihkin atihkin commented Jan 23, 2026

Add formatted table output for hardware options showing:

  • Hardware ID
  • GPU type, count, and memory
  • Availability status with color-coded indicators
  • Pricing information

Changes:

  • Add format_hardware_table() function for formatted table display
  • Update fetch_and_print_hardware_options() to use new table format
  • Show availability column only when model is specified
  • Color-coded status: green (available), red (unavailable), yellow (insufficient)

Resolves: MLE-2935

Have you read the Contributing Guidelines?

Issue #

Describe your changes

Screenshot 2026-01-22 at 4 31 17 PM

Add formatted table output for hardware options showing:
- Hardware ID
- GPU type, count, and memory
- Availability status with color-coded indicators
- Pricing information

Changes:
- Add format_hardware_table() function for formatted table display
- Update fetch_and_print_hardware_options() to use new table format
- Show availability column only when model is specified
- Color-coded status: green (available), red (unavailable), yellow (insufficient)

Resolves: MLE-2935
@atihkin atihkin requested a review from blainekasten January 23, 2026 00:31
else:
row = f" {hw.id:<{id_width}} {gpu_type:<12} {gpu_count:<5} {gpu_memory:<8} {price:<12}"

click.echo(row, err=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, but you can simplify a lot of this code by using tabulate - which we do in all tthe other table renders.

See the models list method here: https://github.com/togethercomputer/together-python/blob/main/src/together/cli/api/models.py#L55

@atihkin atihkin force-pushed the nikitha/mle-2935-hardware-availability-display branch from c5f677b to 7c3ec26 Compare January 27, 2026 15:59
- Replace manual column-width formatting with tabulate library
- Add re module to clean up GPU type names
- Improve error handling for invalid hardware selection with multiple error patterns
@atihkin atihkin force-pushed the nikitha/mle-2935-hardware-availability-display branch from 7c3ec26 to b70a4be Compare January 27, 2026 16:01
@blainekasten blainekasten merged commit e96624e into main Jan 27, 2026
11 checks passed
@blainekasten blainekasten deleted the nikitha/mle-2935-hardware-availability-display branch January 27, 2026 16:08
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.

3 participants