Commit 19173aa4 authored by Guoxin's avatar Guoxin Committed by QuanluZhang
Browse files

merge v1.0(bug bash) back to master (#1462)

* squash commits in v1.0 first round bug bash
parent f721b431
...@@ -83,7 +83,7 @@ class Compare extends React.Component<CompareProps, {}> { ...@@ -83,7 +83,7 @@ class Compare extends React.Component<CompareProps, {}> {
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
// name: '# Intermeidate', // name: '# Intermediate',
boundaryGap: false, boundaryGap: false,
data: xAxis data: xAxis
}, },
...@@ -194,9 +194,9 @@ class Compare extends React.Component<CompareProps, {}> { ...@@ -194,9 +194,9 @@ class Compare extends React.Component<CompareProps, {}> {
maskClosable={false} maskClosable={false}
width="90%" width="90%"
> >
<Row className="compare-intermeidate"> <Row className="compare-intermediate">
{this.intermediate()} {this.intermediate()}
<Row className="compare-yAxis"># Intermeidate</Row> <Row className="compare-yAxis"># Intermediate</Row>
</Row> </Row>
<Row>{this.initColumn()}</Row> <Row>{this.initColumn()}</Row>
</Modal> </Modal>
......
...@@ -42,8 +42,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> { ...@@ -42,8 +42,7 @@ class ExperimentDrawer extends React.Component<ExpDrawerProps, ExpDrawerState> {
let trialMessagesArr = res1.data; let trialMessagesArr = res1.data;
const interResultList = res2.data; const interResultList = res2.data;
Object.keys(trialMessagesArr).map(item => { Object.keys(trialMessagesArr).map(item => {
// transform hyperparameters as object to show elegantly // not deal with trial's hyperParameters
trialMessagesArr[item].hyperParameters = JSON.parse(trialMessagesArr[item].hyperParameters);
const trialId = trialMessagesArr[item].id; const trialId = trialMessagesArr[item].id;
// add intermediate result message // add intermediate result message
trialMessagesArr[item].intermediate = []; trialMessagesArr[item].intermediate = [];
......
...@@ -42,6 +42,8 @@ interface OverviewState { ...@@ -42,6 +42,8 @@ interface OverviewState {
interface OverviewProps { interface OverviewProps {
interval: number; // user select interval: number; // user select
whichPageToFresh: string; whichPageToFresh: string;
concurrency: number;
changeConcurrency: (val: number) => void;
} }
class Overview extends React.Component<OverviewProps, OverviewState> { class Overview extends React.Component<OverviewProps, OverviewState> {
...@@ -61,7 +63,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -61,7 +63,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
id: '', id: '',
author: '', author: '',
experName: '', experName: '',
runConcurren: 0, runConcurren: 1,
maxDuration: 0, maxDuration: 0,
execDuration: 0, execDuration: 0,
MaxTrialNum: 0, MaxTrialNum: 0,
...@@ -264,7 +266,8 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -264,7 +266,8 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
profile.succTrial += 1; profile.succTrial += 1;
const desJobDetail: Parameters = { const desJobDetail: Parameters = {
parameters: {}, parameters: {},
intermediate: [] intermediate: [],
multiProgress: 1
}; };
const duration = (tableData[item].endTime - tableData[item].startTime) / 1000; const duration = (tableData[item].endTime - tableData[item].startTime) / 1000;
const acc = getFinal(tableData[item].finalMetricData); const acc = getFinal(tableData[item].finalMetricData);
...@@ -273,6 +276,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -273,6 +276,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
if (tempara !== undefined) { if (tempara !== undefined) {
const tempLength = tempara.length; const tempLength = tempara.length;
const parameters = JSON.parse(tempara[tempLength - 1]).parameters; const parameters = JSON.parse(tempara[tempLength - 1]).parameters;
desJobDetail.multiProgress = tempara.length;
if (typeof parameters === 'string') { if (typeof parameters === 'string') {
desJobDetail.parameters = JSON.parse(parameters); desJobDetail.parameters = JSON.parse(parameters);
} else { } else {
...@@ -462,6 +466,18 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -462,6 +466,18 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
accNodata, status, errorStr, trialNumber, bestAccuracy, isMultiPhase, accNodata, status, errorStr, trialNumber, bestAccuracy, isMultiPhase,
titleMaxbgcolor, titleMinbgcolor, isLogCollection, experimentAPI titleMaxbgcolor, titleMinbgcolor, isLogCollection, experimentAPI
} = this.state; } = this.state;
const { concurrency } = this.props;
trialProfile.runConcurren = concurrency;
Object.keys(experimentAPI).map(item => {
if (item === 'params') {
const temp = experimentAPI[item];
Object.keys(temp).map(index => {
if (index === 'trialConcurrency') {
temp[index] = concurrency;
}
});
}
});
return ( return (
<div className="overview"> <div className="overview">
...@@ -480,7 +496,8 @@ class Overview extends React.Component<OverviewProps, OverviewState> { ...@@ -480,7 +496,8 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
bestAccuracy={bestAccuracy} bestAccuracy={bestAccuracy}
status={status} status={status}
errors={errorStr} errors={errorStr}
updateFile={this.showSessionPro} concurrency={concurrency}
changeConcurrency={this.props.changeConcurrency}
/> />
</Col> </Col>
{/* experiment parameters search space tuner assessor... */} {/* experiment parameters search space tuner assessor... */}
......
...@@ -136,7 +136,7 @@ class SlideBar extends React.Component<SliderProps, SliderState> { ...@@ -136,7 +136,7 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
onChange={this.handleVisibleChange} onChange={this.handleVisibleChange}
title={ title={
<span> <span>
<span>Download</span> <span>View</span>
</span> </span>
} }
> >
...@@ -234,7 +234,7 @@ class SlideBar extends React.Component<SliderProps, SliderState> { ...@@ -234,7 +234,7 @@ class SlideBar extends React.Component<SliderProps, SliderState> {
> >
<a className="ant-dropdown-link" href="#"> <a className="ant-dropdown-link" href="#">
<Icon type="download" className="down-icon" /> <Icon type="download" className="down-icon" />
<span>Download</span> <span>View</span>
{ {
menuVisible menuVisible
? ?
......
...@@ -9,7 +9,7 @@ import DefaultPoint from './trial-detail/DefaultMetricPoint'; ...@@ -9,7 +9,7 @@ import DefaultPoint from './trial-detail/DefaultMetricPoint';
import Duration from './trial-detail/Duration'; import Duration from './trial-detail/Duration';
import Title1 from './overview/Title1'; import Title1 from './overview/Title1';
import Para from './trial-detail/Para'; import Para from './trial-detail/Para';
import Intermediate from './trial-detail/Intermeidate'; import Intermediate from './trial-detail/Intermediate';
import TableList from './trial-detail/TableList'; import TableList from './trial-detail/TableList';
const TabPane = Tabs.TabPane; const TabPane = Tabs.TabPane;
import '../static/style/trialsDetail.scss'; import '../static/style/trialsDetail.scss';
...@@ -38,6 +38,8 @@ interface TrialDetailState { ...@@ -38,6 +38,8 @@ interface TrialDetailState {
interface TrialsDetailProps { interface TrialsDetailProps {
interval: number; interval: number;
whichPageToFresh: string; whichPageToFresh: string;
columnList: Array<string>;
changeColumn: (val: Array<string>) => void;
} }
class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> { class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> {
...@@ -112,7 +114,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -112,7 +114,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
let desc: Parameters = { let desc: Parameters = {
parameters: {}, parameters: {},
intermediate: [], intermediate: [],
progress: 1 multiProgress: 1
}; };
let duration = 0; let duration = 0;
const id = trialJobs[item].id !== undefined const id = trialJobs[item].id !== undefined
...@@ -133,7 +135,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -133,7 +135,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
const tempHyper = trialJobs[item].hyperParameters; const tempHyper = trialJobs[item].hyperParameters;
if (tempHyper !== undefined) { if (tempHyper !== undefined) {
const getPara = JSON.parse(tempHyper[tempHyper.length - 1]).parameters; const getPara = JSON.parse(tempHyper[tempHyper.length - 1]).parameters;
desc.progress = tempHyper.length; desc.multiProgress = tempHyper.length;
if (typeof getPara === 'string') { if (typeof getPara === 'string') {
desc.parameters = JSON.parse(getPara); desc.parameters = JSON.parse(getPara);
} else { } else {
...@@ -397,6 +399,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -397,6 +399,7 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
whichGraph, searchPlaceHolder whichGraph, searchPlaceHolder
} = this.state; } = this.state;
const source = isHasSearch ? searchResultSource : tableListSource; const source = isHasSearch ? searchResultSource : tableListSource;
const { columnList, changeColumn } = this.props;
return ( return (
<div> <div>
<div className="trial" id="tabsty"> <div className="trial" id="tabsty">
...@@ -482,6 +485,8 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState> ...@@ -482,6 +485,8 @@ class TrialsDetail extends React.Component<TrialsDetailProps, TrialDetailState>
platform={experimentInfo.platform} platform={experimentInfo.platform}
updateList={this.getDetailSource} updateList={this.getDetailSource}
logCollection={experimentLogCollection} logCollection={experimentLogCollection}
columnList={columnList}
changeColumn={changeColumn}
ref={(tabList) => this.tableList = tabList} ref={(tabList) => this.tableList = tabList}
/> />
</div> </div>
......
...@@ -11,11 +11,12 @@ import '../../static/style/probar.scss'; ...@@ -11,11 +11,12 @@ import '../../static/style/probar.scss';
interface ProgressProps { interface ProgressProps {
trialProfile: Experiment; trialProfile: Experiment;
concurrency: number;
trialNumber: TrialNumber; trialNumber: TrialNumber;
bestAccuracy: number; bestAccuracy: number;
status: string; status: string;
errors: string; errors: string;
updateFile: Function; changeConcurrency: (val: number) => void;
} }
interface ProgressState { interface ProgressState {
...@@ -45,12 +46,14 @@ class Progressed extends React.Component<ProgressProps, ProgressState> { ...@@ -45,12 +46,14 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
const { btnName } = this.state; const { btnName } = this.state;
if (this._isMounted) { if (this._isMounted) {
if (btnName === 'Edit') { if (btnName === 'Edit') {
// user click edit
this.setState(() => ({ this.setState(() => ({
isEnable: false, isEnable: false,
btnName: 'Save', btnName: 'Save',
cancelSty: 'inline-block' cancelSty: 'inline-block'
})); }));
} else { } else {
// user click save button
axios(`${MANAGER_IP}/experiment`, { axios(`${MANAGER_IP}/experiment`, {
method: 'GET' method: 'GET'
}) })
...@@ -81,9 +84,7 @@ class Progressed extends React.Component<ProgressProps, ProgressState> { ...@@ -81,9 +84,7 @@ class Progressed extends React.Component<ProgressProps, ProgressState> {
message.destroy(); message.destroy();
message.success(`Update ${CONTROLTYPE[1].toLocaleLowerCase()} message.success(`Update ${CONTROLTYPE[1].toLocaleLowerCase()}
successfully`); successfully`);
// rerender trial profile message this.props.changeConcurrency(parseInt(userInputVal, 10));
const { updateFile } = this.props;
updateFile();
} }
}) })
.catch(error => { .catch(error => {
......
...@@ -98,7 +98,7 @@ class OpenRow extends React.Component<OpenRowProps, OpenRowState> { ...@@ -98,7 +98,7 @@ class OpenRow extends React.Component<OpenRowProps, OpenRowState> {
For the entire parameter set, please refer to the following " For the entire parameter set, please refer to the following "
<a href={trialink} target="_blank">{trialink}</a>". <a href={trialink} target="_blank">{trialink}</a>".
<br/> <br/>
Current Phase: {record.description.progress}. Current Phase: {record.description.multiProgress}.
</Row> </Row>
: :
<div /> <div />
......
...@@ -275,7 +275,7 @@ class DefaultPoint extends React.Component<DefaultPointProps, DefaultPointState> ...@@ -275,7 +275,7 @@ class DefaultPoint extends React.Component<DefaultPointProps, DefaultPointState>
<div> <div>
<div className="default-metric"> <div className="default-metric">
<div className="position"> <div className="position">
<span className="bold">optimization curve</span> <span className="bold">Optimization curve</span>
<Switch defaultChecked={false} onChange={this.loadDefault} /> <Switch defaultChecked={false} onChange={this.loadDefault} />
</div> </div>
</div> </div>
......
...@@ -292,7 +292,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState> ...@@ -292,7 +292,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
isFilter isFilter
? ?
<span> <span>
<span className="filter-x"># Intermeidate</span> <span className="filter-x"># Intermediate</span>
<input <input
// placeholder="point" // placeholder="point"
ref={input => this.pointInput = input} ref={input => this.pointInput = input}
...@@ -321,7 +321,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState> ...@@ -321,7 +321,7 @@ class Intermediate extends React.Component<IntermediateProps, IntermediateState>
null null
} }
</Row> </Row>
<Row className="intermeidate-graph"> <Row className="intermediate-graph">
<ReactEcharts <ReactEcharts
option={interSource} option={interSource}
style={{ width: '100%', height: 418, margin: '0 auto' }} style={{ width: '100%', height: 418, margin: '0 auto' }}
......
...@@ -237,7 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -237,7 +237,8 @@ class Para extends React.Component<ParaProps, ParaState> {
show: true show: true
}, },
axisLabel: { axisLabel: {
formatter: function (value: string) { formatter: function (value?: string) {
if (value !== undefined) {
const length = value.length; const length = value.length;
if (length > 16) { if (length > 16) {
const temp = value.split(''); const temp = value.split('');
...@@ -248,6 +249,9 @@ class Para extends React.Component<ParaProps, ParaState> { ...@@ -248,6 +249,9 @@ class Para extends React.Component<ParaProps, ParaState> {
} else { } else {
return value; return value;
} }
} else {
return null;
}
} }
}, },
} }
......
...@@ -4,7 +4,7 @@ import ReactEcharts from 'echarts-for-react'; ...@@ -4,7 +4,7 @@ import ReactEcharts from 'echarts-for-react';
import { Row, Table, Button, Popconfirm, Modal, Checkbox, Select, Icon } from 'antd'; import { Row, Table, Button, Popconfirm, Modal, Checkbox, Select, Icon } from 'antd';
const Option = Select.Option; const Option = Select.Option;
const CheckboxGroup = Checkbox.Group; const CheckboxGroup = Checkbox.Group;
import { MANAGER_IP, trialJobStatus, COLUMN, COLUMN_INDEX, COLUMNPro } from '../../static/const'; import { MANAGER_IP, trialJobStatus, COLUMN_INDEX, COLUMNPro } from '../../static/const';
import { convertDuration, intermediateGraphOption, killJob, filterByStatus } from '../../static/function'; import { convertDuration, intermediateGraphOption, killJob, filterByStatus } from '../../static/function';
import { TableObj, TrialJob } from '../../static/interface'; import { TableObj, TrialJob } from '../../static/interface';
import OpenRow from '../public-child/OpenRow'; import OpenRow from '../public-child/OpenRow';
...@@ -32,6 +32,8 @@ interface TableListProps { ...@@ -32,6 +32,8 @@ interface TableListProps {
platform: string; platform: string;
logCollection: boolean; logCollection: boolean;
isMultiPhase: boolean; isMultiPhase: boolean;
columnList: Array<string>; // user select columnKeys
changeColumn: (val: Array<string>) => void;
} }
interface TableListState { interface TableListState {
...@@ -39,7 +41,6 @@ interface TableListState { ...@@ -39,7 +41,6 @@ interface TableListState {
modalVisible: boolean; modalVisible: boolean;
isObjFinal: boolean; isObjFinal: boolean;
isShowColumn: boolean; isShowColumn: boolean;
columnSelected: Array<string>; // user select columnKeys
selectRows: Array<TableObj>; selectRows: Array<TableObj>;
isShowCompareModal: boolean; isShowCompareModal: boolean;
selectedRowKeys: string[] | number[]; selectedRowKeys: string[] | number[];
...@@ -69,7 +70,6 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -69,7 +70,6 @@ class TableList extends React.Component<TableListProps, TableListState> {
isObjFinal: false, isObjFinal: false,
isShowColumn: false, isShowColumn: false,
isShowCompareModal: false, isShowCompareModal: false,
columnSelected: COLUMN,
selectRows: [], selectRows: [],
selectedRowKeys: [], // close selected trial message after modal closed selectedRowKeys: [], // close selected trial message after modal closed
intermediateData: [], intermediateData: [],
...@@ -120,6 +120,8 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -120,6 +120,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
} }
} }
// intermediate button click -> intermediate graph for each trial
// support intermediate is dict
selectOtherKeys = (value: string) => { selectOtherKeys = (value: string) => {
const isShowDefault: boolean = value === 'default' ? true : false; const isShowDefault: boolean = value === 'default' ? true : false;
...@@ -193,7 +195,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -193,7 +195,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
case 'Status': case 'Status':
case 'Operation': case 'Operation':
case 'Default': case 'Default':
case 'Intermeidate count': case 'Intermediate count':
break; break;
default: default:
finalKeys.push(checkedValues[m]); finalKeys.push(checkedValues[m]);
...@@ -226,7 +228,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -226,7 +228,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
}); });
if (this._isMounted) { if (this._isMounted) {
this.setState(() => ({ columnSelected: wantResult })); this.props.changeColumn(wantResult);
} }
} }
...@@ -277,8 +279,8 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -277,8 +279,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
render() { render() {
const { entries, tableSource, updateList } = this.props; const { entries, tableSource, updateList, columnList } = this.props;
const { intermediateOption, modalVisible, isShowColumn, columnSelected, const { intermediateOption, modalVisible, isShowColumn,
selectRows, isShowCompareModal, selectedRowKeys, intermediateOtherKeys } = this.state; selectRows, isShowCompareModal, selectedRowKeys, intermediateOtherKeys } = this.state;
const rowSelection = { const rowSelection = {
selectedRowKeys: selectedRowKeys, selectedRowKeys: selectedRowKeys,
...@@ -316,8 +318,8 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -316,8 +318,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
value: item value: item
}); });
}); });
Object.keys(columnSelected).map(key => { Object.keys(columnList).map(key => {
const item = columnSelected[key]; const item = columnList[key];
switch (item) { switch (item) {
case 'Trial No.': case 'Trial No.':
showColumn.push({ showColumn.push({
...@@ -392,7 +394,7 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -392,7 +394,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
sorter: (a: TableObj, b: TableObj): number => a.status.localeCompare(b.status) sorter: (a: TableObj, b: TableObj): number => a.status.localeCompare(b.status)
}); });
break; break;
case 'Intermeidate count': case 'Intermediate count':
showColumn.push({ showColumn.push({
title: 'Intermediate count', title: 'Intermediate count',
dataIndex: 'progress', dataIndex: 'progress',
...@@ -413,13 +415,12 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -413,13 +415,12 @@ class TableList extends React.Component<TableListProps, TableListState> {
key: 'acc', key: 'acc',
width: 120, width: 120,
sorter: (a: TableObj, b: TableObj) => { sorter: (a: TableObj, b: TableObj) => {
const aa = a.description.intermediate; const oneArr = a.description.intermediate;
const bb = b.description.intermediate; const otherArr = b.description.intermediate;
if (aa !== undefined && bb !== undefined) { const one = (oneArr[oneArr.length - 1] !== undefined) ? oneArr[oneArr.length - 1] : 0;
return aa[aa.length - 1] - bb[bb.length - 1]; const other = (otherArr[otherArr.length - 1] !== undefined)
} else { ? otherArr[otherArr.length - 1] : 0;
return NaN; return one - other;
}
}, },
render: (text: string, record: TableObj) => { render: (text: string, record: TableObj) => {
return ( return (
...@@ -581,7 +582,8 @@ class TableList extends React.Component<TableListProps, TableListState> { ...@@ -581,7 +582,8 @@ class TableList extends React.Component<TableListProps, TableListState> {
> >
<CheckboxGroup <CheckboxGroup
options={showTitle} options={showTitle}
defaultValue={columnSelected} defaultValue={columnList}
// defaultValue={columnSelected}
onChange={this.selectedColumn} onChange={this.selectedColumn}
className="titleColumn" className="titleColumn"
/> />
......
...@@ -42,7 +42,7 @@ const COLUMN_INDEX = [ ...@@ -42,7 +42,7 @@ const COLUMN_INDEX = [
index: 4 index: 4
}, },
{ {
name: 'Intermeidate count', name: 'Intermediate count',
index: 5 index: 5
}, },
{ {
...@@ -57,7 +57,7 @@ const COLUMN_INDEX = [ ...@@ -57,7 +57,7 @@ const COLUMN_INDEX = [
// defatult selected column // defatult selected column
const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', 'Operation']; const COLUMN = ['Trial No.', 'ID', 'Duration', 'Status', 'Default', 'Operation'];
// all choice column !dictory final // all choice column !dictory final
const COLUMNPro = ['Trial No.', 'ID', 'Duration', 'Status', 'Intermeidate count', 'Default', 'Operation']; const COLUMNPro = ['Trial No.', 'ID', 'Duration', 'Status', 'Intermediate count', 'Default', 'Operation'];
export { export {
MANAGER_IP, DOWNLOAD_IP, trialJobStatus, COLUMNPro, MANAGER_IP, DOWNLOAD_IP, trialJobStatus, COLUMNPro,
CONTROLTYPE, MONACO, COLUMN, COLUMN_INDEX, DRAWEROPTION CONTROLTYPE, MONACO, COLUMN, COLUMN_INDEX, DRAWEROPTION
......
...@@ -27,7 +27,7 @@ interface Parameters { ...@@ -27,7 +27,7 @@ interface Parameters {
parameters: ErrorParameter; parameters: ErrorParameter;
logPath?: string; logPath?: string;
intermediate: Array<number>; intermediate: Array<number>;
progress?: number; multiProgress?: number;
} }
interface Experiment { interface Experiment {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
} }
} }
.compare-intermeidate{ .compare-intermediate{
position: relative; position: relative;
.compare-yAxis{ .compare-yAxis{
color: #333; color: #333;
......
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
} }
} }
/* for # intermediate in intermeidate graph*/ /* for # intermediate in intermediate graph*/
.intermeidate-graph{ .intermediate-graph{
position: relative; position: relative;
.yAxis{ .yAxis{
color: #333; color: #333;
......
...@@ -131,5 +131,3 @@ if __name__ == '__main__': ...@@ -131,5 +131,3 @@ if __name__ == '__main__':
setup_experiment(args.preinstall) setup_experiment(args.preinstall)
run(args) run(args)
#
\ No newline at end of file
...@@ -103,11 +103,11 @@ def stop_experiment_test(): ...@@ -103,11 +103,11 @@ def stop_experiment_test():
snooze() snooze()
assert not detect_port(8990), '`nnictl stop %s` failed to stop experiments' % experiment_id assert not detect_port(8990), '`nnictl stop %s` failed to stop experiments' % experiment_id
# test cmd `nnictl stop all` # test cmd `nnictl stop --all`
proc = subprocess.run(['nnictl', 'stop', 'all']) proc = subprocess.run(['nnictl', 'stop', '--all'])
assert proc.returncode == 0, '`nnictl stop all` failed with code %d' % proc.returncode assert proc.returncode == 0, '`nnictl stop --all` failed with code %d' % proc.returncode
snooze() snooze()
assert not detect_port(8888) and not detect_port(8989), '`nnictl stop all` failed to stop experiments' assert not detect_port(8888) and not detect_port(8989), '`nnictl stop --all` failed to stop experiments'
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -54,7 +54,7 @@ def start_container(image, name, nnimanager_os): ...@@ -54,7 +54,7 @@ def start_container(image, name, nnimanager_os):
else: else:
return '/tmp/nni/dist/{0}'.format(wheel_name) return '/tmp/nni/dist/{0}'.format(wheel_name)
pip_cmds = ['docker', 'exec', name, 'python3', '-m', 'pip', 'install', '--upgrade', 'pip'] pip_cmds = ['docker', 'exec', name, 'python3', '-m', 'pip', 'install', '--upgrade', 'pip', 'setuptools==39.1.0']
check_call(pip_cmds) check_call(pip_cmds)
sdk_cmds = ['docker', 'exec', name, 'python3', '-m', 'pip', 'install', get_dist(wheel_name)] sdk_cmds = ['docker', 'exec', name, 'python3', '-m', 'pip', 'install', get_dist(wheel_name)]
check_call(sdk_cmds) check_call(sdk_cmds)
......
...@@ -7,7 +7,7 @@ __nnictl_update_searchspace_cmds="--filename" ...@@ -7,7 +7,7 @@ __nnictl_update_searchspace_cmds="--filename"
__nnictl_update_concurrency_cmds="--value" __nnictl_update_concurrency_cmds="--value"
__nnictl_update_duration_cmds="--value" __nnictl_update_duration_cmds="--value"
__nnictl_update_trialnum_cmds="--value" __nnictl_update_trialnum_cmds="--value"
__nnictl_stop_cmds="--port all" __nnictl_stop_cmds="--port --all"
__nnictl_trial_cmds="ls kill codegen" __nnictl_trial_cmds="ls kill codegen"
__nnictl_trial_kill_cmds="--trial_id" __nnictl_trial_kill_cmds="--trial_id"
__nnictl_trial_codegen_cmds="--trial_id" __nnictl_trial_codegen_cmds="--trial_id"
......
...@@ -70,8 +70,8 @@ common_schema = { ...@@ -70,8 +70,8 @@ common_schema = {
} }
} }
tuner_schema_dict = { tuner_schema_dict = {
('TPE', 'Anneal', 'SMAC'): { ('Anneal', 'SMAC'): {
'builtinTunerName': setChoice('builtinTunerName', 'TPE', 'Anneal', 'SMAC'), 'builtinTunerName': setChoice('builtinTunerName', 'Anneal', 'SMAC'),
Optional('classArgs'): { Optional('classArgs'): {
'optimize_mode': setChoice('optimize_mode', 'maximize', 'minimize'), 'optimize_mode': setChoice('optimize_mode', 'maximize', 'minimize'),
}, },
...@@ -94,7 +94,7 @@ tuner_schema_dict = { ...@@ -94,7 +94,7 @@ tuner_schema_dict = {
}, },
'TPE': { 'TPE': {
'builtinTunerName': 'TPE', 'builtinTunerName': 'TPE',
'classArgs': { Optional('classArgs'): {
Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'), Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'),
Optional('parallel_optimize'): setType('parallel_optimize', bool), Optional('parallel_optimize'): setType('parallel_optimize', bool),
Optional('constant_liar_type'): setChoice('constant_liar_type', 'min', 'max', 'mean') Optional('constant_liar_type'): setChoice('constant_liar_type', 'min', 'max', 'mean')
...@@ -104,7 +104,7 @@ tuner_schema_dict = { ...@@ -104,7 +104,7 @@ tuner_schema_dict = {
}, },
'NetworkMorphism': { 'NetworkMorphism': {
'builtinTunerName': 'NetworkMorphism', 'builtinTunerName': 'NetworkMorphism',
'classArgs': { Optional('classArgs'): {
Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'), Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'),
Optional('task'): setChoice('task', 'cv','nlp','common'), Optional('task'): setChoice('task', 'cv','nlp','common'),
Optional('input_width'): setType('input_width', int), Optional('input_width'): setType('input_width', int),
...@@ -116,7 +116,7 @@ tuner_schema_dict = { ...@@ -116,7 +116,7 @@ tuner_schema_dict = {
}, },
'MetisTuner': { 'MetisTuner': {
'builtinTunerName': 'MetisTuner', 'builtinTunerName': 'MetisTuner',
'classArgs': { Optional('classArgs'): {
Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'), Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'),
Optional('no_resampling'): setType('no_resampling', bool), Optional('no_resampling'): setType('no_resampling', bool),
Optional('no_candidates'): setType('no_candidates', bool), Optional('no_candidates'): setType('no_candidates', bool),
...@@ -128,7 +128,7 @@ tuner_schema_dict = { ...@@ -128,7 +128,7 @@ tuner_schema_dict = {
}, },
'GPTuner': { 'GPTuner': {
'builtinTunerName': 'GPTuner', 'builtinTunerName': 'GPTuner',
'classArgs': { Optional('classArgs'): {
Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'), Optional('optimize_mode'): setChoice('optimize_mode', 'maximize', 'minimize'),
Optional('utility'): setChoice('utility', 'ei', 'ucb', 'poi'), Optional('utility'): setChoice('utility', 'ei', 'ucb', 'poi'),
Optional('kappa'): setType('kappa', float), Optional('kappa'): setType('kappa', float),
...@@ -233,8 +233,7 @@ pai_trial_schema = { ...@@ -233,8 +233,7 @@ pai_trial_schema = {
'cpuNum': setNumberRange('cpuNum', int, 0, 99999), 'cpuNum': setNumberRange('cpuNum', int, 0, 99999),
'memoryMB': setType('memoryMB', int), 'memoryMB': setType('memoryMB', int),
'image': setType('image', str), 'image': setType('image', str),
Optional('authFile'): And(Regex(r'hdfs://(([0-9]{1,3}.){3}[0-9]{1,3})(:[0-9]{2,5})?(/.*)?'),\ Optional('authFile'): And(os.path.exists, error=SCHEMA_PATH_ERROR % 'authFile'),
error='ERROR: authFile format error, authFile format is hdfs://xxx.xxx.xxx.xxx:xxx'),
Optional('shmMB'): setType('shmMB', int), Optional('shmMB'): setType('shmMB', int),
Optional('dataDir'): And(Regex(r'hdfs://(([0-9]{1,3}.){3}[0-9]{1,3})(:[0-9]{2,5})?(/.*)?'),\ Optional('dataDir'): And(Regex(r'hdfs://(([0-9]{1,3}.){3}[0-9]{1,3})(:[0-9]{2,5})?(/.*)?'),\
error='ERROR: dataDir format error, dataDir format is hdfs://xxx.xxx.xxx.xxx:xxx'), error='ERROR: dataDir format error, dataDir format is hdfs://xxx.xxx.xxx.xxx:xxx'),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment