Skip to content

Commit

Permalink
feat(JAQPOT-207): add tags field on edit model (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv authored Aug 1, 2024
1 parent 8601d77 commit 97798f7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/api.schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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<string, never>;
};
};
/** @enum {string} */
ModelVisibility: "PUBLIC" | "ORG_SHARED" | "PRIVATE";
Library: {
Expand Down Expand Up @@ -717,6 +724,7 @@ export interface operations {
name: string;
description?: string;
visibility: components["schemas"]["ModelVisibility"];
tags?: string;
sharedWithOrganizationIds?: number[];
affiliatedOrganizationIds?: number[];
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default function ModelAdminTab({ model }: FeaturesTabProps) {
name: model.name,
visibility: model.visibility,
description: model.description ?? '',
tags: model.tags ?? '',
sharedWithOrganizationIds,
affiliatedOrganizationIds,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export default function ModelEditTab({ model }: FeaturesTabProps) {
name: model.name,
visibility: model.visibility,
description: model.description ?? '',
tags: model.tags ?? '',
sharedWithOrganizationIds,
affiliatedOrganizationIds,
});
Expand Down Expand Up @@ -217,6 +218,18 @@ export default function ModelEditTab({ model }: FeaturesTabProps) {
</Select>
</div>
)}

<div>
<Textarea
label="Tags"
name="tags"
description="Adding tags to your model will help others find it more easily through the search."
placeholder="Enter a space separated list of tags"
value={formData.tags}
maxLength={1000}
onChange={handleChange}
/>
</div>
</div>
<Button
isLoading={isLoading}
Expand Down

0 comments on commit 97798f7

Please sign in to comment.