From 53b38e312564adfd65cec9ffb054f50f4ebc68d0 Mon Sep 17 00:00:00 2001 From: xuehui <15910515251@163.com> Date: Fri, 7 Feb 2020 17:34:27 +0800 Subject: [PATCH 1/5] quick fix paik8s --- .../training_service/pai/paiK8S/paiK8SData.ts | 8 +++++++- .../pai/paiK8S/paiK8STrainingService.ts | 18 ++++++++++-------- src/sdk/pynni/nni/nni | 1 + 3 files changed, 18 insertions(+), 9 deletions(-) create mode 120000 src/sdk/pynni/nni/nni diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts index a1733f99cd..f26722f881 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts @@ -30,7 +30,13 @@ else fi`; export const PAI_K8S_TRIAL_COMMAND_FORMAT: string = -`export NNI_PLATFORM=pai NNI_SYS_DIR={0} NNI_OUTPUT_DIR={1} NNI_TRIAL_JOB_ID={2} NNI_EXP_ID={3} NNI_TRIAL_SEQ_ID={4} MULTI_PHASE={5} \ +` +apt-get update \ +&& umask 000 \ +&& apt-get install --assume-yes nfs-common \ +&& mkdir --parents /data \ +&& mount -t nfs4 gcr-openpai-infra02:/pai/data /data \ +&& export NNI_PLATFORM=pai NNI_SYS_DIR={0} NNI_OUTPUT_DIR={1} NNI_TRIAL_JOB_ID={2} NNI_EXP_ID={3} NNI_TRIAL_SEQ_ID={4} MULTI_PHASE={5} \ && ls $NNI_SYS_DIR \ && cd $NNI_SYS_DIR && sh install_nni.sh \ && python3 -m nni_trial_tool.trial_keeper --trial_command '{6}' --nnimanager_ip '{7}' --nnimanager_port '{8}' \ diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts index fc64d4dbdc..a141dcd545 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts @@ -59,6 +59,9 @@ class PAIK8STrainingService extends PAITrainingService { public async setClusterMetadata(key: string, value: string): Promise { switch (key) { + case TrialConfigMetadataKey.NNI_MANAGER_IP: + this.nniManagerIpConfig = JSON.parse(value); + break; case TrialConfigMetadataKey.PAI_CLUSTER_CONFIG: this.paiJobRestServer = new PAIJobRestServer(component.get(PAIK8STrainingService)); this.paiClusterConfig = JSON.parse(value); @@ -170,13 +173,11 @@ class PAIK8STrainingService extends PAITrainingService { ] } }, - extras: { - 'com.microsoft.pai.runtimeplugin': [ - { - plugin: this.paiTrialConfig.paiStoragePlugin - } - ], - submitFrom: 'submit-job-v2' + extras: { + submitFrom: 'submit-job-v2', + hivedScheduler: { + jobPriorityClass: 'prod', + } } } if (this.paiTrialConfig.virtualCluster) { @@ -232,7 +233,8 @@ class PAIK8STrainingService extends PAITrainingService { //Copy codeDir files to local working folder await execCopydir(this.paiTrialConfig.codeDir, trialLocalFolder); - const nniManagerIp: string = this.nniManagerIpConfig ? this.nniManagerIpConfig.nniManagerIp : getIPV4Address(); + // const nniManagerIp: string = this.nniManagerIpConfig ? this.nniManagerIpConfig.nniManagerIp : getIPV4Address(); + const nniManagerIp: string = "172.23.234.89"; const version: string = this.versionCheck ? await getVersion() : ''; const containerWorkingDir: string = `${this.paiTrialConfig.containerNFSMountPath}/${this.experimentId}/${trialJobId}`; const nniPaiTrialCommand: string = String.Format( diff --git a/src/sdk/pynni/nni/nni b/src/sdk/pynni/nni/nni new file mode 120000 index 0000000000..d46265fd66 --- /dev/null +++ b/src/sdk/pynni/nni/nni @@ -0,0 +1 @@ +../src/sdk/pynni/nni \ No newline at end of file From d9fea904440af171c03b26079639978993f23660 Mon Sep 17 00:00:00 2001 From: xuehui <15910515251@163.com> Date: Tue, 11 Feb 2020 11:12:37 +0800 Subject: [PATCH 2/5] update for stay master --- docs/en_US/FeatureEngineering/Overview.md | 6 ++++++ .../training_service/pai/paiK8S/paiK8SData.ts | 10 ++-------- .../pai/paiK8S/paiK8STrainingService.ts | 18 ++++++++++-------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/docs/en_US/FeatureEngineering/Overview.md b/docs/en_US/FeatureEngineering/Overview.md index 7790cbd8be..23172277ef 100644 --- a/docs/en_US/FeatureEngineering/Overview.md +++ b/docs/en_US/FeatureEngineering/Overview.md @@ -6,6 +6,12 @@ For now, we support the following feature selector: - [GradientFeatureSelector](./GradientFeatureSelector.md) - [GBDTSelector](./GBDTSelector.md) +These selector are suitable for tabular data(which means it doesn't include image, speech and text data). + +In addition, those selector only for feature selection. If you want to: +1) generate high-order combined features on nni while doing feature selection; +2) leverage your distributed resources; +you could try this [example](https://github.com/microsoft/nni/tree/master/examples/feature_engineering/auto-feature-engineering). ## How to use? diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts index f26722f881..5954cc05a7 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts @@ -30,14 +30,8 @@ else fi`; export const PAI_K8S_TRIAL_COMMAND_FORMAT: string = -` -apt-get update \ -&& umask 000 \ -&& apt-get install --assume-yes nfs-common \ -&& mkdir --parents /data \ -&& mount -t nfs4 gcr-openpai-infra02:/pai/data /data \ -&& export NNI_PLATFORM=pai NNI_SYS_DIR={0} NNI_OUTPUT_DIR={1} NNI_TRIAL_JOB_ID={2} NNI_EXP_ID={3} NNI_TRIAL_SEQ_ID={4} MULTI_PHASE={5} \ +`export NNI_PLATFORM=pai NNI_SYS_DIR={0} NNI_OUTPUT_DIR={1} NNI_TRIAL_JOB_ID={2} NNI_EXP_ID={3} NNI_TRIAL_SEQ_ID={4} MULTI_PHASE={5} \ && ls $NNI_SYS_DIR \ && cd $NNI_SYS_DIR && sh install_nni.sh \ && python3 -m nni_trial_tool.trial_keeper --trial_command '{6}' --nnimanager_ip '{7}' --nnimanager_port '{8}' \ ---nni_manager_version '{9}' --log_collection '{10}'`; +--nni_manager_version '{9}' --log_collection '{10}'`; \ No newline at end of file diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts index 3d9e301b4d..2c20febd8e 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts @@ -63,6 +63,7 @@ class PAIK8STrainingService extends PAITrainingService { case TrialConfigMetadataKey.NNI_MANAGER_IP: this.nniManagerIpConfig = JSON.parse(value); break; + case TrialConfigMetadataKey.PAI_CLUSTER_CONFIG: this.paiJobRestServer = new PAIJobRestServer(component.get(PAIK8STrainingService)); this.paiClusterConfig = JSON.parse(value); @@ -174,11 +175,13 @@ class PAIK8STrainingService extends PAITrainingService { ] } }, - extras: { - submitFrom: 'submit-job-v2', - hivedScheduler: { - jobPriorityClass: 'prod', - } + extras: { + 'com.microsoft.pai.runtimeplugin': [ + { + plugin: this.paiTrialConfig.paiStoragePlugin + } + ], + submitFrom: 'submit-job-v2' } } if (this.paiTrialConfig.virtualCluster) { @@ -246,8 +249,7 @@ class PAIK8STrainingService extends PAITrainingService { //Copy codeDir files to local working folder await execCopydir(this.paiTrialConfig.codeDir, trialLocalFolder); - // const nniManagerIp: string = this.nniManagerIpConfig ? this.nniManagerIpConfig.nniManagerIp : getIPV4Address(); - const nniManagerIp: string = "172.23.234.89"; + const nniManagerIp: string = this.nniManagerIpConfig ? this.nniManagerIpConfig.nniManagerIp : getIPV4Address(); const version: string = this.versionCheck ? await getVersion() : ''; const containerWorkingDir: string = `${this.paiTrialConfig.containerNFSMountPath}/${this.experimentId}/${trialJobId}`; const nniPaiTrialCommand: string = String.Format( @@ -298,4 +300,4 @@ class PAIK8STrainingService extends PAITrainingService { } } -export { PAIK8STrainingService }; +export { PAIK8STrainingService }; \ No newline at end of file From 1b615fe50a4167251860f482b2c31832cbed93d0 Mon Sep 17 00:00:00 2001 From: xuehui <15910515251@163.com> Date: Wed, 12 Feb 2020 13:54:07 +0800 Subject: [PATCH 3/5] minus change --- src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts | 2 +- .../training_service/pai/paiK8S/paiK8STrainingService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts index 5954cc05a7..a1733f99cd 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8SData.ts @@ -34,4 +34,4 @@ export const PAI_K8S_TRIAL_COMMAND_FORMAT: string = && ls $NNI_SYS_DIR \ && cd $NNI_SYS_DIR && sh install_nni.sh \ && python3 -m nni_trial_tool.trial_keeper --trial_command '{6}' --nnimanager_ip '{7}' --nnimanager_port '{8}' \ ---nni_manager_version '{9}' --log_collection '{10}'`; \ No newline at end of file +--nni_manager_version '{9}' --log_collection '{10}'`; diff --git a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts index 2c20febd8e..263009719c 100644 --- a/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts +++ b/src/nni_manager/training_service/pai/paiK8S/paiK8STrainingService.ts @@ -300,4 +300,4 @@ class PAIK8STrainingService extends PAITrainingService { } } -export { PAIK8STrainingService }; \ No newline at end of file +export { PAIK8STrainingService }; From 3922d18ef7fdcaca96f7861c42146fbac0735070 Mon Sep 17 00:00:00 2001 From: xuehui <15910515251@163.com> Date: Mon, 17 Feb 2020 10:14:13 +0800 Subject: [PATCH 4/5] fix typo --- docs/en_US/FeatureEngineering/Overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en_US/FeatureEngineering/Overview.md b/docs/en_US/FeatureEngineering/Overview.md index 23172277ef..1d668cec09 100644 --- a/docs/en_US/FeatureEngineering/Overview.md +++ b/docs/en_US/FeatureEngineering/Overview.md @@ -6,7 +6,7 @@ For now, we support the following feature selector: - [GradientFeatureSelector](./GradientFeatureSelector.md) - [GBDTSelector](./GBDTSelector.md) -These selector are suitable for tabular data(which means it doesn't include image, speech and text data). +These selectors are suitable for tabular data(which means it doesn't include image, speech and text data). In addition, those selector only for feature selection. If you want to: 1) generate high-order combined features on nni while doing feature selection; From 8ac1e8dc45c2862b7580a407335c5f52cfaa4b18 Mon Sep 17 00:00:00 2001 From: xuehui Date: Mon, 17 Feb 2020 10:46:02 +0800 Subject: [PATCH 5/5] Delete nni --- src/sdk/pynni/nni/nni | 1 - 1 file changed, 1 deletion(-) delete mode 120000 src/sdk/pynni/nni/nni diff --git a/src/sdk/pynni/nni/nni b/src/sdk/pynni/nni/nni deleted file mode 120000 index d46265fd66..0000000000 --- a/src/sdk/pynni/nni/nni +++ /dev/null @@ -1 +0,0 @@ -../src/sdk/pynni/nni \ No newline at end of file