Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cli/azd/extensions/azure.ai.finetune/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History


## 0.0.13-preview (2026-01-28)

- Defaulting to supervise when fine tuning method is not return by API
Comment thread
achauhan-scc marked this conversation as resolved.
- Adding training Type when cloning a job
Comment thread
achauhan-scc marked this conversation as resolved.

## 0.0.12-preview (2026-01-23)

- Add Project-endpoint parameter to init command
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/extensions/azure.ai.finetune/extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace: ai.finetuning
displayName: Foundry Fine Tuning (Preview)
description: Extension for Foundry Fine Tuning. (Preview)
usage: azd ai finetuning <command> [options]
version: 0.0.12-preview
version: 0.0.13-preview
language: go
capabilities:
- custom-commands
Expand Down
5 changes: 5 additions & 0 deletions cli/azd/extensions/azure.ai.finetune/internal/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,11 @@ method:
yamlContent += fmt.Sprintf("validation_file: %s\n", job.ValidationFile)
}

// Add extra_body with trainingType if present
if trainingType, ok := job.ExtraFields["trainingType"]; ok {
yamlContent += fmt.Sprintf("extra_body:\n trainingType: %v\n", trainingType)
}

// Determine the output directory (use src flag or current directory)
outputDir := a.flags.src
if outputDir == "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,18 @@ func convertOpenAIJobToModel(openaiJob openai.FineTuningJob) *models.FineTuningJ

// convertOpenAIJobToDetailModel converts OpenAI SDK job to detailed domain model
func convertOpenAIJobToDetailModel(openaiJob *openai.FineTuningJob) *models.FineTuningJobDetail {
// Extract hyperparameters from OpenAI job
// Extract extra fields from the API response
extraFields := make(map[string]interface{})
for key, field := range openaiJob.JSON.ExtraFields {
// Parse the raw JSON value
var value interface{}
if err := json.Unmarshal([]byte(field.Raw()), &value); err == nil {
extraFields[key] = value
} else {
extraFields[key] = string(field.Raw())
}
}
Comment thread
achauhan-scc marked this conversation as resolved.

hyperparameters := &models.Hyperparameters{}
if openaiJob.Method.Type == "supervised" {
hyperparameters.BatchSize = openaiJob.Method.Supervised.Hyperparameters.BatchSize.OfInt
Expand All @@ -86,6 +97,7 @@ func convertOpenAIJobToDetailModel(openaiJob *openai.FineTuningJob) *models.Fine
}
} else {
// Fallback to top-level hyperparameters (for backward compatibility)
openaiJob.Method.Type = "supervised"
hyperparameters.BatchSize = openaiJob.Hyperparameters.BatchSize.OfInt
hyperparameters.LearningRateMultiplier = openaiJob.Hyperparameters.LearningRateMultiplier.OfFloat
hyperparameters.NEpochs = openaiJob.Hyperparameters.NEpochs.OfInt
Expand Down Expand Up @@ -120,6 +132,7 @@ func convertOpenAIJobToDetailModel(openaiJob *openai.FineTuningJob) *models.Fine
ValidationFile: openaiJob.ValidationFile,
Hyperparameters: hyperparameters,
Seed: openaiJob.Seed,
ExtraFields: extraFields,
}

return jobDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,13 @@ type FineTuningJobDetail struct {
CreatedAt time.Time `json:"created_at" yaml:"created_at"`
FinishedAt *time.Time `json:"finished_at,omitempty" yaml:"finished_at,omitempty"`
EstimatedFinish *time.Time `json:"estimated_finish,omitempty" yaml:"estimated_finish,omitempty"`
Method string `json:"training_type" yaml:"training_type"`
Method string `json:"method.type" yaml:"method.type"`
Comment thread
achauhan-scc marked this conversation as resolved.
TrainingFile string `json:"training_file" yaml:"training_file"`
ValidationFile string `json:"validation_file,omitempty" yaml:"validation_file,omitempty"`
Hyperparameters *Hyperparameters `json:"hyperparameters" yaml:"hyperparameters"`
VendorMetadata map[string]interface{} `json:"-" yaml:"-"`
Seed int64 `json:"-" yaml:"-"`
ExtraFields map[string]interface{} `json:"extra_fields,omitempty" yaml:"extra_fields,omitempty"`
}

// JobEvent represents an event associated with a fine-tuning job
Expand Down
2 changes: 1 addition & 1 deletion cli/azd/extensions/azure.ai.finetune/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.12-preview
0.0.13-preview
Loading