Skip to content

Commit 13b5725

Browse files
authored
fix: workflows updated to support changes in model ID (#35)
* fix: failing tests with create workflow * chore: remove unnecessary output info input * chore: fix lint issues
1 parent 8880964 commit 13b5725

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/client/app.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -598,20 +598,20 @@ export class App extends Lister {
598598
modelId: modelObject.id,
599599
authConfig: {
600600
pat: this.pat,
601-
appId: this.userAppId.getAppId(),
602-
userId: this.userAppId.getUserId(),
601+
appId: modelObject.appId,
602+
userId: modelObject.userId,
603603
},
604604
});
605+
let modelVersion: resources_pb.ModelVersion;
605606
if (outputInfo) {
606-
const modelVersion = new ModelVersion().setOutputInfo(outputInfo);
607-
const modelWithVersion = await model.createVersion(modelVersion);
608-
if (modelWithVersion) {
609-
allModels.push(modelWithVersion);
610-
continue;
611-
}
607+
modelVersion = new ModelVersion().setOutputInfo(outputInfo);
612608
} else {
613-
await model.loadInfo();
614-
allModels.push(model.modelInfo.toObject());
609+
modelVersion = new ModelVersion();
610+
}
611+
const modelWithVersion = await model.createVersion(modelVersion);
612+
if (modelWithVersion) {
613+
allModels.push(modelWithVersion);
614+
continue;
615615
}
616616
}
617617
}

tests/client/workflow/fixtures/single_branch_with_public_cropper_model_and_latest_version.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ workflow:
88
- id: cropper
99
model:
1010
modelId: margin-110-image-crop
11+
modelTypeId: image-crop
1112

1213
nodeInputs:
1314
- nodeId: detector

0 commit comments

Comments
 (0)