From 09eb1cddca53bfc37bccb437151df1c434279711 Mon Sep 17 00:00:00 2001 From: SparkSnail Date: Thu, 11 Oct 2018 11:25:09 +0800 Subject: [PATCH 1/2] quick fix bug: assessor validation in nnictl (#200) * fix nnictl bug * add hdfs host validation * fix bugs * fix dockerfile * fix install.sh * update install.sh * fix dockerfile * Set timeout for HDFSUtility exists function * remove unused TODO * fix sdk * add optional for outputDir and dataDir * refactor dockerfile.base * Remove unused import in hdfsclientUtility * add config_pai.yml * refactor nnictl create logic and add colorful print * fix nnictl stop logic * add annotation for config_pai.yml * add document for start experiment * fix config.yml * fix document * fix dataDir and outputDir in config_pai.yml * fix config_pai.yml * fix assessor launcher --- tools/nnicmd/config_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/nnicmd/config_schema.py b/tools/nnicmd/config_schema.py index d6299256bd..5407e284e0 100644 --- a/tools/nnicmd/config_schema.py +++ b/tools/nnicmd/config_schema.py @@ -48,7 +48,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, From d2dcb38351943433d1b2dc8366f2b891585729e3 Mon Sep 17 00:00:00 2001 From: Lijiao <35484733+lvybriage@users.noreply.github.com> Date: Fri, 12 Oct 2018 12:00:10 +0800 Subject: [PATCH 2/2] Disable the tensorboard button about pai experiment (#192) --- src/webui/src/components/TrialStatus.tsx | 31 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) 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> {