Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Merge 0.2 into master #237

Merged
merged 6 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/trials/auto-gbdt/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/ga_squad/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/mnist-annotation/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/mnist-batch-tune-keras/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/mnist-keras/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/mnist-smartparam/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/mnist/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
4 changes: 2 additions & 2 deletions examples/trials/pytorch_cifar10/config_pai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ trial:
#The docker image to run nni job on pai
image: openpai/pai.example.tensorflow
#The hdfs directory to store data on pai, format 'hdfs://host:port/directory'
hdfsDataDir: hdfs://10.10.10.10:9000/username/nni
dataDir: hdfs://10.10.10.10:9000/username/nni
#The hdfs directory to store output data generated by nni, format 'hdfs://host:port/directory'
hdfsOutputDir: hdfs://10.10.10.10:9000/username/nni
outputDir: hdfs://10.10.10.10:9000/username/nni
paiConfig:
#The username to login pai
userName: username
Expand Down
31 changes: 27 additions & 4 deletions src/webui/src/components/TrialStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ interface TabState {
trialJobs: object;
intermediateOption: object;
modalVisible: boolean;
disTensorButton: boolean;
}

class TrialStatus extends React.Component<{}, TabState> {
Expand Down Expand Up @@ -83,7 +84,8 @@ class TrialStatus extends React.Component<{}, TabState> {
option: {},
intermediateOption: {},
trialJobs: {},
modalVisible: false
modalVisible: false,
disTensorButton: false
};
}

Expand Down Expand Up @@ -368,13 +370,34 @@ class TrialStatus extends React.Component<{}, TabState> {
}
}

// experiment mode is pai, display tensorboard button
disTensorBoard = () => {
axios(`${MANAGER_IP}/experiment`, {
method: 'GET'
})
.then(res => {
if (res.status === 200) {
const experimentObj = res.data;
const trainPlatform = experimentObj.params.trainingServicePlatform;
if (trainPlatform && trainPlatform === 'pai') {
if (this._isMounted) {
this.setState(() => ({
disTensorButton: true
}));
}
}
}
});
}

componentDidMount() {

this._isMounted = true;
// the init of running chart
this.drawRunGraph();
// the init of trials status in the table
this.drawTable();
this.disTensorBoard();
this.intervalID = window.setInterval(this.drawRunGraph, 10000);
this.intervalIDS = window.setInterval(this.drawTable, 10000);
}
Expand All @@ -387,7 +410,7 @@ class TrialStatus extends React.Component<{}, TabState> {
}

render() {
const { intermediateOption, modalVisible, option, tableData } = this.state;
const { intermediateOption, modalVisible, option, tableData, disTensorButton } = this.state;
let bgColor = '';
const trialJob: Array<TrialJob> = [];
trialJobStatus.map(item => {
Expand Down Expand Up @@ -490,7 +513,7 @@ class TrialStatus extends React.Component<{}, TabState> {
</Button>
)
);
},
}
}, {
title: 'Tensor',
dataIndex: 'tensor',
Expand All @@ -501,6 +524,7 @@ class TrialStatus extends React.Component<{}, TabState> {
<Button
type="primary"
className="tableButton"
disabled={disTensorButton}
onClick={this.getTensorpage.bind(this, record.id)}
>
TensorBoard
Expand All @@ -509,7 +533,6 @@ class TrialStatus extends React.Component<{}, TabState> {
},
}
];

const openRow = (record: TableObj) => {
let isHasParameters = true;
if (record.description.parameters.error) {
Expand Down
2 changes: 1 addition & 1 deletion tools/nnicmd/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
'builtinAssessorName': lambda x: x in ['Medianstop'],
'classArgs': {
'optimize_mode': lambda x: x in ['maximize', 'minimize']},
'gpuNum': And(int, lambda x: 0 <= x <= 99999)
Optional('gpuNum'): And(int, lambda x: 0 <= x <= 99999)
},{
'codeDir': os.path.exists,
'classFileName': str,
Expand Down