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
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func printJobDetails(d *jobDetails) {

// Environment & Code
w = tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
fmt.Fprintf(w, "Environment:\t%s\n", valueOrDash(props.EnvironmentID))
fmt.Fprintf(w, "Environment:\t%s\n", valueOrDash(props.EnvironmentImageReference))

// Show code ID from job props, or fall back to run history inputs
codeID := props.CodeID
Expand Down Expand Up @@ -455,11 +455,11 @@ func printComputeSection(d *jobDetails) {
func printInputsSection(inputs map[string]models.JobInput, history *models.RunHistory) {
// Merge: job inputs + any extra inputs from run history not in the job response
type mergedInput struct {
Name string
Type string
Mode string
Value string // URI or literal value
AssetID string // from run history
Name string
Type string
Mode string
Value string // URI or literal value
AssetID string // from run history
}

seen := make(map[string]bool)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ func newJobSubmitCommand() *cobra.Command {
// buildJobResource converts a parsed YAML JobDefinition into the REST API payload.
func buildJobResource(def *utils.JobDefinition) *models.JobResource {
job := models.CommandJob{
JobType: "Command",
DisplayName: def.DisplayName,
Description: def.Description,
Command: def.Command,
EnvironmentID: def.Environment,
ComputeID: def.Compute,
CodeID: def.Code,
EnvironmentVariables: def.EnvironmentVariables,
JobType: "Command",
DisplayName: def.DisplayName,
Description: def.Description,
Command: def.Command,
EnvironmentImageReference: def.Environment,
ComputeID: def.Compute,
CodeID: def.Code,
EnvironmentVariables: def.EnvironmentVariables,
}

if job.DisplayName == "" {
Expand Down
36 changes: 18 additions & 18 deletions cli/azd/extensions/azure.ai.customtraining/pkg/models/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ type JobResource struct {

// CommandJob represents the properties of a Foundry command job.
type CommandJob struct {
JobType string `json:"jobType"`
DisplayName string `json:"displayName,omitempty" table:"DISPLAY NAME"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty" table:"STATUS"`
Command string `json:"command,omitempty"`
EnvironmentID string `json:"environmentId,omitempty"`
CodeID string `json:"codeId,omitempty"`
ComputeID string `json:"computeId,omitempty"`
Inputs map[string]JobInput `json:"inputs,omitempty"`
Outputs map[string]JobOutput `json:"outputs,omitempty"`
Distribution *Distribution `json:"distribution,omitempty"`
Resources *ResourceConfig `json:"resources,omitempty"`
Limits *CommandJobLimits `json:"limits,omitempty"`
EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"`
QueueSettings *QueueSettings `json:"queueSettings,omitempty"`
IsArchived bool `json:"isArchived,omitempty"`
CreatedDateTime string `json:"createdDateTime,omitempty"`
Services map[string]interface{} `json:"services,omitempty"`
JobType string `json:"jobType"`
DisplayName string `json:"displayName,omitempty" table:"DISPLAY NAME"`
Description string `json:"description,omitempty"`
Status string `json:"status,omitempty" table:"STATUS"`
Command string `json:"command,omitempty"`
EnvironmentImageReference string `json:"environmentImageReference,omitempty"`
CodeID string `json:"codeId,omitempty"`
ComputeID string `json:"computeId,omitempty"`
Inputs map[string]JobInput `json:"inputs,omitempty"`
Outputs map[string]JobOutput `json:"outputs,omitempty"`
Distribution *Distribution `json:"distribution,omitempty"`
Resources *ResourceConfig `json:"resources,omitempty"`
Limits *CommandJobLimits `json:"limits,omitempty"`
EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"`
QueueSettings *QueueSettings `json:"queueSettings,omitempty"`
IsArchived bool `json:"isArchived,omitempty"`
CreatedDateTime string `json:"createdDateTime,omitempty"`
Services map[string]interface{} `json:"services,omitempty"`
}

// TerminalStatuses contains job statuses that indicate the job has finished.
Expand Down