You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2021/11/29 07:00:27 UTC
[GitHub] [submarine] andybi7676 commented on a change in pull request #812: SUBMARINE-1092. Use Model Management REST API in Model Management Page
andybi7676 commented on a change in pull request #812:
URL: https://github.com/apache/submarine/pull/812#discussion_r758080805
##########
File path: submarine-workbench/workbench-web/src/app/pages/workbench/model/model-home/model-home.component.ts
##########
@@ -38,80 +39,23 @@ export class ModelHomeComponent implements OnInit {
listOfChosenTags = [];
ngOnInit() {
- this.modelCards = [
- {
- 'name': "Model One",
- 'createTime': "2021-10-12",
- 'updatedTime': "2021-10-13",
- 'tags': ["image", 'text'],
- 'description': "first model",
- },
- {
- 'name': "Model Two",
- 'createTime': "2021-10-12",
- 'updatedTime': "2021-10-13",
- 'tags': ["speech"],
- 'description': "second model",
- },
- {
- 'name': "Model Three",
- 'createTime': "2021-10-12",
- 'updatedTime': "2021-10-13",
- 'tags': ["speech"],
- 'description': "The third model has very long description for description shorten testing, 1234567890 A recurrent neural network (RNN) is a class of artificial neural networks where connections between nodes form a directed graph along a temporal sequence. This allows it to exhibit temporal dynamic behavior. Derived from feedforward neural networks, RNNs can use their internal state (memory) to process variable length sequences of inputs",
- },
- {
- 'name': "ModelFour",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["nlp", 'ssl'],
- 'description': "BERT, a famous ssl model in NLP.",
- },
- {
- 'name': "ModelFive",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["speech", 'ssl'],
- 'description': "huBERT, a famous ssl model in SP.",
- },
- {
- 'name': "ModelSix",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["CV", 'ssl'],
- 'description': "SimCLR, a famous ssl model in CV.",
- },
- {
- 'name': "ModelFour",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["nlp", 'ssl'],
- 'description': "BERT, a famous ssl model in NLP.",
- },
- {
- 'name': "ModelFive",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["speech", 'ssl'],
- 'description': "huBERT, a famous ssl model in SP.",
- },
- {
- 'name': "ModelSix",
- 'createTime': "2021-10-18",
- 'updatedTime': "2021-10-19",
- 'tags': ["CV", 'ssl'],
- 'description': "SimCLR, a famous ssl model in CV.",
- },
- ];
-
- this.onDisplayModelCards = this.modelCards.map(card => card);
- let tags = [];
- this.modelCards.map((card) => {
- Array.prototype.push.apply(tags, card.tags);
+ this.fetchModelCards();
+ this.modelService.emitInfo(null);
+ }
+
+ fetchModelCards = () => {
+ this.modelService.fetchModelList().subscribe((res) => {
+ this.modelCards = res;
+ this.onDisplayModelCards = this.modelCards.map(card => card);
+ let tags = [];
+ this.modelCards.map((card) => {
+ Array.prototype.push.apply(tags, card.tags);
+ });
+ let tags_set = new Set(tags);
+ tags = Array.from(tags_set);
Review comment:
But different models may have the same tag, right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@submarine.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org