From 910074a31918eed14dca60206d5bae3df0d5fc80 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Wed, 12 Aug 2020 16:28:27 +0800 Subject: [PATCH 1/3] fix break windows local and remote pipelines --- test/nni_test/nnitest/run_tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/nni_test/nnitest/run_tests.py b/test/nni_test/nnitest/run_tests.py index 2dc9bfe8a6..d56cc21e68 100644 --- a/test/nni_test/nnitest/run_tests.py +++ b/test/nni_test/nnitest/run_tests.py @@ -126,6 +126,9 @@ def get_command(test_case_config, commandKey): # hack for windows, not limited to local training service if sys.platform == 'win32': command = command.replace('python3', 'python') + command = command.replace('mkdir', 'md') + command = command.replace('/', '\\') + command = command.replace('touch', 'type nul>') return command From 2dc0b875616d56c1091558e10f5b7794d5f3b8c2 Mon Sep 17 00:00:00 2001 From: linbin <756691769@qq.com> Date: Wed, 12 Aug 2020 17:16:52 +0800 Subject: [PATCH 2/3] python os to separate platform --- test/config/integration_tests.yml | 2 +- test/nni_test/nnitest/run_tests.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/test/config/integration_tests.yml b/test/config/integration_tests.yml index b3802239da..a2480d8564 100644 --- a/test/config/integration_tests.yml +++ b/test/config/integration_tests.yml @@ -158,7 +158,7 @@ testCases: configFile: test/config/examples/sklearn-regression.yml setExperimentIdtoVar: $resumeExpId # for subfolder in codedir test - launchCommand: mkdir -p ../examples/trials/sklearn/regression/subfolder && touch ../examples/trials/sklearn/regression/subfolder/subfile && nnictl create --config $configFile --debug + launchCommand: python3 -c "import os; os.mkdir('../examples/trials/sklearn/regression/subfolder'); open('../examples/trials/sklearn/regression/subfolder/subfile', 'a').close()" && nnictl create --config $configFile --debug # Experiment resume test part 2 - name: nnictl-resume-2 diff --git a/test/nni_test/nnitest/run_tests.py b/test/nni_test/nnitest/run_tests.py index d56cc21e68..2dc9bfe8a6 100644 --- a/test/nni_test/nnitest/run_tests.py +++ b/test/nni_test/nnitest/run_tests.py @@ -126,9 +126,6 @@ def get_command(test_case_config, commandKey): # hack for windows, not limited to local training service if sys.platform == 'win32': command = command.replace('python3', 'python') - command = command.replace('mkdir', 'md') - command = command.replace('/', '\\') - command = command.replace('touch', 'type nul>') return command From 4b8fd966ae854bf1085991e4bca486e43974c188 Mon Sep 17 00:00:00 2001 From: Yuge Zhang Date: Wed, 12 Aug 2020 19:56:38 +0800 Subject: [PATCH 3/3] Update integration_tests.yml --- test/config/integration_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/config/integration_tests.yml b/test/config/integration_tests.yml index a2480d8564..40cb8fc9bd 100644 --- a/test/config/integration_tests.yml +++ b/test/config/integration_tests.yml @@ -158,7 +158,7 @@ testCases: configFile: test/config/examples/sklearn-regression.yml setExperimentIdtoVar: $resumeExpId # for subfolder in codedir test - launchCommand: python3 -c "import os; os.mkdir('../examples/trials/sklearn/regression/subfolder'); open('../examples/trials/sklearn/regression/subfolder/subfile', 'a').close()" && nnictl create --config $configFile --debug + launchCommand: python3 -c "import os; os.makedirs('../examples/trials/sklearn/regression/subfolder', exist_ok=True); open('../examples/trials/sklearn/regression/subfolder/subfile', 'a').close()" && nnictl create --config $configFile --debug # Experiment resume test part 2 - name: nnictl-resume-2