From b6b55640fd941a3f65757cce3bf94f910960ae4d Mon Sep 17 00:00:00 2001 From: hansinikarunarathne Date: Tue, 3 Sep 2024 19:12:33 +0530 Subject: [PATCH] Revert "Allow custom ServingRuntimes (#92)" This reverts commit 4675bb95805b7197c340b762ec07a5a0fd06d7cd. Signed-off-by: hansinikarunarathne --- Makefile | 4 ---- frontend/src/app/shared/utils.ts | 9 ++++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 90ce0a9..881b2f1 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,6 @@ IMG ?= kserve/models-web-app TAG ?= $(shell git describe --tags --always --dirty) ARCH ?= linux/amd64 -# Prettier UI format check. -prettier-check: - npm run format:check --prefix frontend - docker-build: docker build -t ${IMG}:${TAG} . diff --git a/frontend/src/app/shared/utils.ts b/frontend/src/app/shared/utils.ts index 6b78ce8..f637e92 100644 --- a/frontend/src/app/shared/utils.ts +++ b/frontend/src/app/shared/utils.ts @@ -143,7 +143,14 @@ export function getPredictorExtensionSpec( predictor: PredictorSpec, ): PredictorExtensionSpec { if (predictor.model) { - return predictor.model; + if ( + Object.values(PredictorType).includes( + predictor.model?.modelFormat.name as PredictorType, + ) + ) { + const spec = predictor.model; + return spec; + } } else { for (const predictorType of Object.values(PredictorType)) { if (predictorType in predictor) {