-
Notifications
You must be signed in to change notification settings - Fork 267
Updating formatting for list and show commands as per specs for finetuning extension #6500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updating formatting for list and show commands as per specs for finetuning extension #6500
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds structured output formatting capabilities to the Azure AI fine-tuning extension, enabling table, JSON, and YAML output formats for job listing and detail commands. It introduces view models for better separation of concerns and improves the user experience with cleaner, more organized output.
Changes:
- Added view models and formatting helpers for displaying fine-tuning job data in multiple formats
- Implemented custom Duration type with JSON/YAML marshaling for human-readable time durations
- Refactored
showandlistcommands to support multiple output formats (table/JSON/YAML)
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
cli/azd/extensions/azure.ai.finetune/pkg/models/views.go |
New file defining view models for table display and conversion methods from domain models |
cli/azd/extensions/azure.ai.finetune/pkg/models/finetune.go |
Added Duration type, JSON/YAML struct tags, and EstimatedFinish field to job detail model |
cli/azd/extensions/azure.ai.finetune/internal/utils/output.go |
New file implementing generic output formatting for table, JSON, and YAML using reflection |
cli/azd/extensions/azure.ai.finetune/internal/utils/status.go |
Added IsTerminalStatus helper function for status checking |
cli/azd/extensions/azure.ai.finetune/internal/providers/openai/conversions.go |
Added duration calculation and conditional timestamp handling for terminal/non-terminal states |
cli/azd/extensions/azure.ai.finetune/internal/cmd/operations.go |
Refactored show/list commands to use new formatting utilities with output format flags |
Notes
json,yaml, andtablestruct tags for serializationencoding/json,text/tabwriter,gopkg.in/yaml.v3Testing
List command
help

default table output and 10 rows

json output

with top flag

Show command
help

default table output

yaml output

json output

with training logs
