const.ts 1.87 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
const CONTROLTYPE = ['MAX_EXEC_DURATION', 'MAX_TRIAL_NUM', 'TRIAL_CONCURRENCY', 'SEARCH_SPACE'];
19
const MONACO = {
Lijiao's avatar
Lijiao committed
20
    readOnly: true,
21
    automaticLayout: true,
22
    scrollBeyondLastLine: false
Lijiao's avatar
Lijiao committed
23
};
v-liguo's avatar
v-liguo committed
24
25
26
27
28
const DRAWEROPTION = {
    minimap: { enabled: false },
    readOnly: true,
    automaticLayout: true
};
29
const OPERATION = 'Operation';
30
// defatult selected column
31
const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', OPERATION];
32
// all choice column !dictory final
33
34
35
36
37
38
39
40
41
42
43
const COLUMNPro = [
    'Trial No.',
    'ID',
    'Start time',
    'End time',
    'Duration',
    'Status',
    'Intermediate result',
    'Default',
    OPERATION
];
44
const CONCURRENCYTOOLTIP = 'Trial concurrency is the number of trials running concurrently.';
45
46
47
48
49
50
51
52
53
54
55
56
57
58
const SUPPORTED_SEARCH_SPACE_TYPE = [
    'choice',
    'layer_choice',
    'input_choice',
    'randint',
    'uniform',
    'quniform',
    'loguniform',
    'qloguniform',
    'normal',
    'qnormal',
    'lognormal',
    'qlognormal'
];
Lijiaoa's avatar
Lijiaoa committed
59

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

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