From f370e17189ef3955f63ed0d1d5f30cc0bec24f8b Mon Sep 17 00:00:00 2001 From: Zejun Lin <871886504@qq.com> Date: Mon, 18 Mar 2019 17:59:30 +0800 Subject: [PATCH 1/2] Fix installation (#864) * fix installation --- Makefile | 11 +---------- setup.py | 11 ----------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 484c046b8a..03452dad2a 100644 --- a/Makefile +++ b/Makefile @@ -109,15 +109,6 @@ dev-install: install-scripts dev-install: #$(_INFO) Complete! You may want to add $(BIN_FOLDER) to your PATH environment $(_END) -# Target for setup.py -# Do not invoke this manually -.PHONY: pip-install -pip-install: install-dependencies -pip-install: build -pip-install: install-node-modules -pip-install: install-scripts -pip-install: update-bash-config - .PHONY: uninstall uninstall: -$(PIP_UNINSTALL) -y nni @@ -173,7 +164,7 @@ install-python-modules: .PHONY: dev-install-python-modules dev-install-python-modules: #$(_INFO) Installing Python SDK $(_END) - sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' setup.py && $(PIP_INSTALL) $(PIP_MODE) . + sed -ie 's/$(NNI_VERSION_TEMPLATE)/$(NNI_VERSION_VALUE)/' setup.py && $(PIP_INSTALL) $(PIP_MODE) -e . .PHONY: install-node-modules diff --git a/setup.py b/setup.py index 661eebfea0..94f4dcb3a3 100644 --- a/setup.py +++ b/setup.py @@ -21,18 +21,10 @@ import os from setuptools import setup, find_packages -from setuptools.command.install import install -import subprocess def read(fname): return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read() -class CustomInstallCommand(install): - '''a customized install class in pip module''' - def run(self): - super().run() - subprocess.run(['make', 'pip-install'], check=True) - setup( name = 'nni', version = '999.0.0-developing', @@ -66,9 +58,6 @@ def run(self): 'PythonWebHDFS' ], - cmdclass={ - 'install': CustomInstallCommand - }, entry_points = { 'console_scripts' : [ 'nnictl = nni_cmd.nnictl:parse_args' From 05c8c9858d70634e348b69d093013f67c912c167 Mon Sep 17 00:00:00 2001 From: SparkSnail Date: Mon, 18 Mar 2019 20:29:09 +0800 Subject: [PATCH 2/2] quick fix version check (#866) --- docs/en_US/ExperimentConfig.md | 2 +- tools/nni_cmd/launcher.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/ExperimentConfig.md b/docs/en_US/ExperimentConfig.md index 1f3d299dfd..f640a26d08 100644 --- a/docs/en_US/ExperimentConfig.md +++ b/docs/en_US/ExperimentConfig.md @@ -152,7 +152,7 @@ machineList: * __debug__ * Description - NNI will check the version of nniManager process and the version of trialKeeper in remote, pai and kubernetes platform. If you want to disable version check, you could set debug be false. + NNI will check the version of nniManager process and the version of trialKeeper in remote, pai and kubernetes platform. If you want to disable version check, you could set debug be true. * __maxTrialNum__ * Description diff --git a/tools/nni_cmd/launcher.py b/tools/nni_cmd/launcher.py index 0d8f3b8926..b52847c089 100644 --- a/tools/nni_cmd/launcher.py +++ b/tools/nni_cmd/launcher.py @@ -271,8 +271,9 @@ def set_experiment(experiment_config, mode, port, config_file_name): request_data['tuner'] = experiment_config['tuner'] if 'assessor' in experiment_config: request_data['assessor'] = experiment_config['assessor'] + #debug mode should disable version check if experiment_config.get('debug') is not None: - request_data['versionCheck'] = experiment_config.get('debug') + request_data['versionCheck'] = not experiment_config.get('debug') request_data['clusterMetaData'] = [] if experiment_config['trainingServicePlatform'] == 'local':