1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
<script>
import { GlLink } from '@gitlab/ui';
import ModelExperimentsHeader from '~/ml/experiment_tracking/components/model_experiments_header.vue';
import DeleteButton from '~/ml/experiment_tracking/components/delete_button.vue';
import {
TITLE_LABEL,
INFO_LABEL,
ID_LABEL,
STATUS_LABEL,
EXPERIMENT_LABEL,
ARTIFACTS_LABEL,
PARAMETERS_LABEL,
METRICS_LABEL,
METADATA_LABEL,
DELETE_CANDIDATE_CONFIRMATION_MESSAGE,
DELETE_CANDIDATE_PRIMARY_ACTION_LABEL,
DELETE_CANDIDATE_MODAL_TITLE,
MLFLOW_ID_LABEL,
} from './translations';
export default {
name: 'MlCandidatesShow',
components: {
ModelExperimentsHeader,
DeleteButton,
GlLink,
},
props: {
candidate: {
type: Object,
required: true,
},
},
i18n: {
TITLE_LABEL,
INFO_LABEL,
ID_LABEL,
STATUS_LABEL,
EXPERIMENT_LABEL,
ARTIFACTS_LABEL,
PARAMETERS_LABEL,
METRICS_LABEL,
METADATA_LABEL,
DELETE_CANDIDATE_CONFIRMATION_MESSAGE,
DELETE_CANDIDATE_PRIMARY_ACTION_LABEL,
DELETE_CANDIDATE_MODAL_TITLE,
MLFLOW_ID_LABEL,
},
computed: {
sections() {
return [
{
sectionName: this.$options.i18n.PARAMETERS_LABEL,
sectionValues: this.candidate.params,
},
{
sectionName: this.$options.i18n.METRICS_LABEL,
sectionValues: this.candidate.metrics,
},
{
sectionName: this.$options.i18n.METADATA_LABEL,
sectionValues: this.candidate.metadata,
},
];
},
},
};
</script>
<template>
<div>
<model-experiments-header :page-title="$options.i18n.TITLE_LABEL">
<delete-button
:delete-path="candidate.info.path"
:delete-confirmation-text="$options.i18n.DELETE_CANDIDATE_CONFIRMATION_MESSAGE"
:action-primary-text="$options.i18n.DELETE_CANDIDATE_PRIMARY_ACTION_LABEL"
:modal-title="$options.i18n.DELETE_CANDIDATE_MODAL_TITLE"
/>
</model-experiments-header>
<table class="candidate-details gl-w-full">
<tbody>
<tr class="divider"></tr>
<tr>
<td class="gl-text-secondary gl-font-weight-bold">{{ $options.i18n.INFO_LABEL }}</td>
<td class="gl-font-weight-bold">{{ $options.i18n.ID_LABEL }}</td>
<td>{{ candidate.info.iid }}</td>
</tr>
<tr>
<td></td>
<td class="gl-font-weight-bold">{{ $options.i18n.MLFLOW_ID_LABEL }}</td>
<td>{{ candidate.info.eid }}</td>
</tr>
<tr>
<td></td>
<td class="gl-font-weight-bold">{{ $options.i18n.STATUS_LABEL }}</td>
<td>{{ candidate.info.status }}</td>
</tr>
<tr>
<td></td>
<td class="gl-font-weight-bold">{{ $options.i18n.EXPERIMENT_LABEL }}</td>
<td>
<gl-link :href="candidate.info.path_to_experiment">{{
candidate.info.experiment_name
}}</gl-link>
</td>
</tr>
<tr v-if="candidate.info.path_to_artifact">
<td></td>
<td class="gl-font-weight-bold">{{ $options.i18n.ARTIFACTS_LABEL }}</td>
<td>
<gl-link :href="candidate.info.path_to_artifact">{{
$options.i18n.ARTIFACTS_LABEL
}}</gl-link>
</td>
</tr>
<template v-for="{ sectionName, sectionValues } in sections">
<tr :key="sectionName" class="divider"></tr>
<tr v-for="(item, index) in sectionValues" :key="item.name">
<td v-if="index === 0" class="gl-text-secondary gl-font-weight-bold">
{{ sectionName }}
</td>
<td v-else></td>
<td class="gl-font-weight-bold">{{ item.name }}</td>
<td>{{ item.value }}</td>
</tr>
</template>
</tbody>
</table>
</div>
</template>
|