const.ts 1.85 KB
Newer Older
1
2
3
4
// when there are more trials than this threshold, metrics will be updated in group of this size to avoid freezing
const METRIC_GROUP_UPDATE_THRESHOLD = 100;
const METRIC_GROUP_UPDATE_SIZE = 20;

5
const MANAGER_IP = `/api/v1/nni`;
6
const DOWNLOAD_IP = `/logs`;
7
const WEBUIDOC = 'https://nni.readthedocs.io/en/latest/Tutorial/WebUI.html';
8
const trialJobStatus = [
Deshui Yu's avatar
Deshui Yu committed
9
10
11
12
13
14
    'UNKNOWN',
    'WAITING',
    'RUNNING',
    'SUCCEEDED',
    'FAILED',
    'USER_CANCELED',
Lijiao's avatar
Lijiao committed
15
16
    'SYS_CANCELED',
    'EARLY_STOPPED'
Deshui Yu's avatar
Deshui Yu committed
17
];
18
19
20
21
22
23
const EXPERIMENTSTATUS = [
    'INITIALIZED',
    'RUNNING',
    'ERROR',
    'STOPPING',
    'STOPPED',
24
    'VIEWED',
25
26
27
28
    'DONE',
    'NO_MORE_TRIAL',
    'TUNER_NO_MORE_TRIAL'
];
29
const CONTROLTYPE = ['MAX_EXEC_DURATION', 'MAX_TRIAL_NUM', 'TRIAL_CONCURRENCY', 'SEARCH_SPACE'];
30
const MONACO = {
Lijiao's avatar
Lijiao committed
31
    readOnly: true,
32
    automaticLayout: true,
33
    scrollBeyondLastLine: false
Lijiao's avatar
Lijiao committed
34
};
v-liguo's avatar
v-liguo committed
35
36
37
38
39
const DRAWEROPTION = {
    minimap: { enabled: false },
    readOnly: true,
    automaticLayout: true
};
40
const OPERATION = 'Operation';
41
// defatult selected column
42
const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', OPERATION];
43
const CONCURRENCYTOOLTIP = 'Trial concurrency is the number of trials running concurrently.';
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const SUPPORTED_SEARCH_SPACE_TYPE = [
    'choice',
    'layer_choice',
    'input_choice',
    'randint',
    'uniform',
    'quniform',
    'loguniform',
    'qloguniform',
    'normal',
    'qnormal',
    'lognormal',
    'qlognormal'
];
Lijiaoa's avatar
Lijiaoa committed
58

59
60
61
const TOOLTIP_BACKGROUND_COLOR = '#484848';
const MAX_TRIAL_NUMBERS = 'Max trial No.';

62
export {
63
64
65
    MANAGER_IP,
    DOWNLOAD_IP,
    trialJobStatus,
66
    EXPERIMENTSTATUS,
67
68
69
70
71
72
73
74
75
    WEBUIDOC,
    CONTROLTYPE,
    MONACO,
    COLUMN,
    DRAWEROPTION,
    OPERATION,
    METRIC_GROUP_UPDATE_THRESHOLD,
    METRIC_GROUP_UPDATE_SIZE,
    CONCURRENCYTOOLTIP,
76
77
78
    SUPPORTED_SEARCH_SPACE_TYPE,
    TOOLTIP_BACKGROUND_COLOR,
    MAX_TRIAL_NUMBERS
79
};