diff --git a/examples/trials/auto-gbdt/config_pai.yml b/examples/trials/auto-gbdt/config_pai.yml index 26577cf83a..feaa881923 100644 --- a/examples/trials/auto-gbdt/config_pai.yml +++ b/examples/trials/auto-gbdt/config_pai.yml @@ -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 diff --git a/examples/trials/ga_squad/config_pai.yml b/examples/trials/ga_squad/config_pai.yml index 56c2d33069..d4435e5657 100644 --- a/examples/trials/ga_squad/config_pai.yml +++ b/examples/trials/ga_squad/config_pai.yml @@ -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 diff --git a/examples/trials/mnist-annotation/config_pai.yml b/examples/trials/mnist-annotation/config_pai.yml index edb9e62384..abc86a908e 100644 --- a/examples/trials/mnist-annotation/config_pai.yml +++ b/examples/trials/mnist-annotation/config_pai.yml @@ -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 diff --git a/examples/trials/mnist-batch-tune-keras/config_pai.yml b/examples/trials/mnist-batch-tune-keras/config_pai.yml index 183c220e2d..c7c0de7a14 100644 --- a/examples/trials/mnist-batch-tune-keras/config_pai.yml +++ b/examples/trials/mnist-batch-tune-keras/config_pai.yml @@ -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 diff --git a/examples/trials/mnist-keras/config_pai.yml b/examples/trials/mnist-keras/config_pai.yml index bbf8136144..cbea797ef3 100644 --- a/examples/trials/mnist-keras/config_pai.yml +++ b/examples/trials/mnist-keras/config_pai.yml @@ -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 diff --git a/examples/trials/mnist-smartparam/config_pai.yml b/examples/trials/mnist-smartparam/config_pai.yml index 4b5a088d11..92e489a30e 100644 --- a/examples/trials/mnist-smartparam/config_pai.yml +++ b/examples/trials/mnist-smartparam/config_pai.yml @@ -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 diff --git a/examples/trials/mnist/config_pai.yml b/examples/trials/mnist/config_pai.yml index a20fdce40b..52ed313ac8 100644 --- a/examples/trials/mnist/config_pai.yml +++ b/examples/trials/mnist/config_pai.yml @@ -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 diff --git a/examples/trials/pytorch_cifar10/config_pai.yml b/examples/trials/pytorch_cifar10/config_pai.yml index 783285f815..fbb3f037a3 100644 --- a/examples/trials/pytorch_cifar10/config_pai.yml +++ b/examples/trials/pytorch_cifar10/config_pai.yml @@ -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 diff --git a/src/webui/package.json b/src/webui/package.json index 0178ccfa98..f4c258ee46 100644 --- a/src/webui/package.json +++ b/src/webui/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "dependencies": { - "antd": "^3.9.3", + "antd": "^3.8.1", "axios": "^0.18.0", "babel-polyfill": "^6.26.0", "echarts": "^4.1.0", diff --git a/src/webui/src/components/SlideBar.tsx b/src/webui/src/components/SlideBar.tsx index adce8a51b4..fa44885123 100644 --- a/src/webui/src/components/SlideBar.tsx +++ b/src/webui/src/components/SlideBar.tsx @@ -11,7 +11,7 @@ class SlideBar extends React.Component<{}, {}> { diff --git a/src/webui/src/components/TrialStatus.tsx b/src/webui/src/components/TrialStatus.tsx index d0e0980ee2..125386cdc5 100644 --- a/src/webui/src/components/TrialStatus.tsx +++ b/src/webui/src/components/TrialStatus.tsx @@ -51,6 +51,7 @@ interface TabState { trialJobs: object; intermediateOption: object; modalVisible: boolean; + disTensorButton: boolean; } class TrialStatus extends React.Component<{}, TabState> { @@ -79,7 +80,8 @@ class TrialStatus extends React.Component<{}, TabState> { option: {}, intermediateOption: {}, trialJobs: {}, - modalVisible: false + modalVisible: false, + disTensorButton: false }; } @@ -346,6 +348,26 @@ 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; @@ -353,6 +375,7 @@ class TrialStatus extends React.Component<{}, TabState> { 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); } @@ -365,7 +388,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 = []; trialJobStatus.map(item => { @@ -457,7 +480,7 @@ class TrialStatus extends React.Component<{}, TabState> { ) ); - }, + } }, { title: 'Tensor', dataIndex: 'tensor', @@ -468,6 +491,7 @@ class TrialStatus extends React.Component<{}, TabState> {