Skip to content

Commit

Permalink
Fix bug of model interface not autopopulating in map
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Nov 20, 2024
1 parent 8d2303d commit 0f6a2b2
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import {
MapEntry,
MapFormValue,
EMPTY_INPUT_MAP_ENTRY,
REQUEST_PREFIX,
REQUEST_PREFIX_WITH_JSONPATH_ROOT_SELECTOR,
} from '../../../../../../common';
import { ModelField } from '../../input_fields';
import {
Expand Down Expand Up @@ -142,9 +144,12 @@ export function MLProcessorInputs(props: MLProcessorInputsProps) {
const newModelInterface = models[modelId]?.interface;
setModelInterface(newModelInterface);
const modelInputsAsForm = [
parseModelInputs(newModelInterface).map(
(modelInput) => EMPTY_INPUT_MAP_ENTRY
) as InputMapFormValue,
parseModelInputs(newModelInterface).map((modelInput) => {
return {
...EMPTY_INPUT_MAP_ENTRY,
key: modelInput.label,
};
}) as InputMapFormValue,
] as InputMapArrayFormValue;
const modelOutputsAsForm = [
parseModelOutputs(newModelInterface).map((modelOutput) => {
Expand Down

0 comments on commit 0f6a2b2

Please sign in to comment.