From bc8a4b881af24e75fec82b49b85ba3ddeeb62c5d Mon Sep 17 00:00:00 2001 From: Alex Arvanitidis Date: Thu, 1 Aug 2024 14:44:46 +0300 Subject: [PATCH] feat(JAQPOT-207): add tags field on edit model --- src/app/api.schema.d.ts | 8 ++++++++ .../[modelId]/components/tabs/ModelAdminTab.tsx | 1 + .../[modelId]/components/tabs/ModelEditTab.tsx | 13 +++++++++++++ 3 files changed, 22 insertions(+) diff --git a/src/app/api.schema.d.ts b/src/app/api.schema.d.ts index 4be9b18..9a4f305 100644 --- a/src/app/api.schema.d.ts +++ b/src/app/api.schema.d.ts @@ -184,6 +184,7 @@ export interface components { affiliatedOrganizations?: components["schemas"]["Organization"][]; tags?: string; legacyPredictionService?: string; + extraConfig?: components["schemas"]["ModelExtraConfig"]; /** * Format: date-time * @description The date and time when the feature was created. @@ -235,6 +236,12 @@ export interface components { }; /** @enum {string} */ ModelType: "SKLEARN" | "TORCH" | "R_BNLEARN_DISCRETE" | "R_CARET" | "R_GBM" | "R_NAIVE_BAYES" | "R_PBPK" | "R_RF" | "R_RPART" | "R_SVM" | "R_TREE_CLASS" | "R_TREE_REGR" | "QSAR_TOOLBOX"; + /** @description A JSON object containing extra configuration for the model */ + ModelExtraConfig: { + torchConfig?: { + [key: string]: Record; + }; + }; /** @enum {string} */ ModelVisibility: "PUBLIC" | "ORG_SHARED" | "PRIVATE"; Library: { @@ -717,6 +724,7 @@ export interface operations { name: string; description?: string; visibility: components["schemas"]["ModelVisibility"]; + tags?: string; sharedWithOrganizationIds?: number[]; affiliatedOrganizationIds?: number[]; }; diff --git a/src/app/dashboard/models/[modelId]/components/tabs/ModelAdminTab.tsx b/src/app/dashboard/models/[modelId]/components/tabs/ModelAdminTab.tsx index 9ee7290..804c6f2 100644 --- a/src/app/dashboard/models/[modelId]/components/tabs/ModelAdminTab.tsx +++ b/src/app/dashboard/models/[modelId]/components/tabs/ModelAdminTab.tsx @@ -64,6 +64,7 @@ export default function ModelAdminTab({ model }: FeaturesTabProps) { name: model.name, visibility: model.visibility, description: model.description ?? '', + tags: model.tags ?? '', sharedWithOrganizationIds, affiliatedOrganizationIds, }); diff --git a/src/app/dashboard/models/[modelId]/components/tabs/ModelEditTab.tsx b/src/app/dashboard/models/[modelId]/components/tabs/ModelEditTab.tsx index 5d2fb23..1c22628 100644 --- a/src/app/dashboard/models/[modelId]/components/tabs/ModelEditTab.tsx +++ b/src/app/dashboard/models/[modelId]/components/tabs/ModelEditTab.tsx @@ -90,6 +90,7 @@ export default function ModelEditTab({ model }: FeaturesTabProps) { name: model.name, visibility: model.visibility, description: model.description ?? '', + tags: model.tags ?? '', sharedWithOrganizationIds, affiliatedOrganizationIds, }); @@ -217,6 +218,18 @@ export default function ModelEditTab({ model }: FeaturesTabProps) { )} + +
+