"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "50cfbcda3267a5efbeb7d48b39f6b8d586a165b2"
interface.ts 4.21 KB
Newer Older
1
2
3
4
5
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { ExperimentConfig } from './experimentConfig';

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
 * Definition of single dimension in search space.
 */
interface SingleAxis {
    baseName: string;
    fullName: string;
    type: string;
    scale: 'log' | 'linear' | 'ordinal';
    domain: any;
    nested: boolean;
}

/**
 * Definition of combination of multiple dimensions.
 * The decision in multiple dimensions will be combined together.
 * Typically, it is a search space or a sub search space.
 */
interface MultipleAxes {
    baseName: string;
    fullName: string;
    axes: Map<string, SingleAxis>;
}

29
30
31
32
33
34
35
36
interface TableRecord {
    key: string;
    sequenceId: number;
    startTime: number;
    endTime?: number;
    id: string;
    duration: number;
    status: string;
37
    message: string;
38
    intermediateCount: number;
Lijiao's avatar
Lijiao committed
39
    latestAccuracy: number | undefined;
40
    formattedLatestAccuracy: string; // format (LATEST/FINAL),
41
42
}

43
44
45
46
47
interface SearchSpace {
    _value: Array<number | string>;
    _type: string;
}

48
49
50
51
interface FinalType {
    default: string;
}

Lijiao's avatar
Lijiao committed
52
53
// trial accuracy
interface AccurPoint {
Lijiao's avatar
Lijiao committed
54
55
    acc: number;
    index: number;
Lijiao's avatar
Lijiao committed
56
57
}

58
59
60
interface DetailAccurPoint {
    acc: number;
    index: number;
61
    searchSpace: object;
62
63
}

64
65
66
67
68
69
interface TooltipForIntermediate {
    data: string;
    seriesName: string;
    dataIndex: number;
}

70
71
72
73
interface TooltipForAccuracy {
    data: Array<number | object>;
}

Lijiao's avatar
Lijiao committed
74
75
76
77
78
79
80
interface Dimobj {
    dim: number;
    name: string;
    max?: number;
    min?: number;
    type?: string;
    data?: string[];
81
82
83
84
    boundaryGap?: boolean;
    axisTick?: object;
    axisLabel?: object;
    axisLine?: object;
85
    nameTextStyle?: object;
Lijiao's avatar
Lijiao committed
86
    scale?: boolean;
Lijiao's avatar
Lijiao committed
87
88
89
90
91
92
93
}

interface ParaObj {
    data: number[][];
    parallelAxis: Array<Dimobj>;
}

94
95
96
97
98
99
100
101
102
interface MetricDataRecord {
    timestamp: number;
    trialJobId: string;
    type: string;
    sequence: number;
    data: string;
}

interface TrialJobInfo {
J-shang's avatar
J-shang committed
103
    trialJobId: string;
104
105
    sequenceId: number;
    status: string;
106
    message: string;
107
108
109
110
111
112
113
114
    startTime?: number;
    endTime?: number;
    hyperParameters?: string[];
    logPath?: string;
    finalMetricData?: MetricDataRecord[];
}

interface ExperimentProfile {
115
    params: ExperimentConfig;
116
117
    id: string;
    execDuration: number;
118
119
    logDir: string;
    startTime: number;
120
121
122
123
124
    endTime?: number;
    maxSequenceId: number;
    revision: number;
}

Yuge Zhang's avatar
Yuge Zhang committed
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
interface ExperimentMetadata {
    id: string;
    port: number;
    startTime: number | string;
    endTime: number | string;
    status: string;
    platform: string;
    experimentName: string;
    tag: any[];
    pid: number;
    webuiUrl: any[];
    logDir: string;
    prefixUrl: string | null;
}

140
141
142
interface NNIManagerStatus {
    status: string;
    errors: string[];
143
144
}

Lijiao's avatar
Lijiao committed
145
146
147
148
interface EventMap {
    [key: string]: () => void;
}

149
150
151
152
153
154
// table column sort
interface SortInfo {
    field: string;
    isDescend?: boolean;
}

155
156
157
158
159
160
161
162
163
164
165
166
interface AllExperimentList {
    id: string;
    experimentName: string;
    port: number;
    status: string;
    platform: string;
    startTime: number;
    endTime: number;
    tag: string[];
    pid: number;
    webuiUrl: string[];
    logDir: string[];
167
    prefixUrl: string;
168
}
Lijiaoa's avatar
Lijiaoa committed
169
170
171
172
173
174
175
176
177
178

interface Tensorboard {
    id: string;
    status: string;
    trialJobIdList: string[];
    trialLogDirectoryList: string[];
    pid: number;
    port: string;
}

179
180
181
182
183
184
185
186
187
188
// for TableList search
interface SearchItems {
    name: string;
    operator: string;
    value1: string; // first input value
    value2: string; // second input value
    choice: string[]; // use select multiy value list
    isChoice: boolean; // for parameters: type = choice and status also as choice type
}

189
190
191
192
193
194
195
196
197
interface allTrialsIntermediateChart {
    name: string;
    // id: string;
    sequenceId: number;
    data: number[];
    parameter: object;
    type: string;
}

Lijiao's avatar
Lijiao committed
198
export {
199
200
201
202
203
204
205
206
207
208
209
210
    TableRecord,
    SearchSpace,
    FinalType,
    AccurPoint,
    DetailAccurPoint,
    TooltipForIntermediate,
    TooltipForAccuracy,
    Dimobj,
    ParaObj,
    MetricDataRecord,
    TrialJobInfo,
    ExperimentProfile,
Yuge Zhang's avatar
Yuge Zhang committed
211
    ExperimentMetadata,
212
213
214
    NNIManagerStatus,
    EventMap,
    SingleAxis,
215
    MultipleAxes,
216
    SortInfo,
Lijiaoa's avatar
Lijiaoa committed
217
    AllExperimentList,
218
    Tensorboard,
219
220
    SearchItems,
    allTrialsIntermediateChart
221
};