Skip to content

Commit

Permalink
Merge pull request #79 from tasos-ale/feature-tasos-custom-predictor
Browse files Browse the repository at this point in the history
mwa(front): Fix custom predictor bug
  • Loading branch information
yuzisun authored May 22, 2024
2 parents 775b93b + 3c74656 commit 880e635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/app/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ export function getPredictorExtensionSpec(

// In the case of Custom predictors, set the additional PredictorExtensionSpec fields
// manually here
const spec = predictor.containers[0] as PredictorExtensionSpec;
const spec = (predictor?.containers?.[0] || {}) as PredictorExtensionSpec;
spec.runtimeVersion = '';
spec.protocolVersion = '';

if (predictor.containers[0]?.env) {
const storageUri = predictor.containers[0].env.find(
if (spec?.env) {
const storageUri = spec.env.find(
envVar => envVar.name.toLowerCase() === 'storage_uri',
);
if (storageUri) {
Expand Down

0 comments on commit 880e635

Please sign in to comment.