diff --git a/integration-test/common/model.ts b/integration-test/common/model.ts index 9819820d51..6f8d196475 100644 --- a/integration-test/common/model.ts +++ b/integration-test/common/model.ts @@ -117,7 +117,7 @@ export type ExpectCorrectModelDetailsProps = { | "STATE_UNSPECIFIED" | "STATE_ERROR"; modelTask: string; - additionalRule?: () => Promise; + additionalRules?: () => Promise; }; export const expectCorrectModelDetails = async ({ @@ -127,7 +127,7 @@ export const expectCorrectModelDetails = async ({ modelInstanceTag, modelState, modelTask, - additionalRule, + additionalRules, }: ExpectCorrectModelDetailsProps) => { await page.goto(`/models/${modelId}`, { waitUntil: "networkidle" }); @@ -166,7 +166,7 @@ export const expectCorrectModelDetails = async ({ expect(await stateToggle.isChecked()).not.toBeTruthy(); } - if (additionalRule) await additionalRule(); + if (additionalRules) await additionalRules(); }; export const expectToDeployModel = async ( diff --git a/integration-test/model-huggingface.spec.ts b/integration-test/model-huggingface.spec.ts index ed5127e678..97fe09da13 100644 --- a/integration-test/model-huggingface.spec.ts +++ b/integration-test/model-huggingface.spec.ts @@ -84,6 +84,13 @@ test.describe.serial("Hugging face model", () => { modelInstanceTag, modelState: "STATE_ONLINE", modelTask: "CLASSIFICATION", + additionalRules: async () => { + const huggingFaceModelIdField = page.locator( + "input#huggingface-model-id" + ); + expect(await huggingFaceModelIdField.isEditable()).toBeFalsy(); + await expect(huggingFaceModelIdField).toHaveValue(huggingFaceId); + }, }); }); diff --git a/src/components/model/ConfigureModelInstanceForm.tsx b/src/components/model/ConfigureModelInstanceForm.tsx index 9febafa706..3f9ab8538d 100644 --- a/src/components/model/ConfigureModelInstanceForm.tsx +++ b/src/components/model/ConfigureModelInstanceForm.tsx @@ -26,6 +26,8 @@ const ConfigureModelInstanceForm = ({ status: null, }); + console.log(modelInstance); + return ( ) : null} + {modelInstance.model_definition === "model-definitions/huggingface" ? ( + <> + + + ) : null}