Skip to content

Commit

Permalink
Fix [Batch Run] Show function's inputs on re-run (#2057)
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-prokopchuk authored Nov 1, 2023
1 parent 7b87922 commit a50253a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/JobWizard/JobWizard.util.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const generateJobWizardDefaultData = (
image: parseImageData(selectedFunctionData, frontendSpec, currentProjectName)
},
[DATA_INPUTS_STEP]: {
dataInputsTable: []
dataInputsTable: parseDefaultDataInputs(functionParameters, defaultData.task.spec.inputs)
},
[PARAMETERS_STEP]: {
parametersFrom: isEmpty(defaultData.task.spec.hyper_param_options?.param_file)
Expand Down Expand Up @@ -287,13 +287,6 @@ export const generateJobWizardDefaultData = (
function: defaultData.task.spec.function
}

if (!isEmpty(defaultData.task.spec.inputs)) {
jobFormData[DATA_INPUTS_STEP].dataInputsTable = parseDefaultDataInputs(
functionParameters,
defaultData.task.spec.inputs
)
}

return [jobFormData, jobAdditionalData]
}

Expand Down Expand Up @@ -633,7 +626,7 @@ export const parseDataInputs = functionParameters => {
.sort(sortParameters)
}

export const parseDefaultDataInputs = (funcParams, runDataInputs) => {
export const parseDefaultDataInputs = (funcParams, runDataInputs = {}) => {
const predefinedDataInputs = chain(funcParams)
.filter(dataInput => dataInput.type?.includes('DataItem'))
.map(dataInput => {
Expand Down

0 comments on commit a50253a

Please sign in to comment.