From 65ddcd0a21c5a8361a61bebf67cd80bf26005d00 Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 15:24:59 +0800 Subject: [PATCH 1/7] update makefile and setup.py --- setup.py | 1 + src/sdk/pynni/setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 14c42828cb..7dd2a67380 100644 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ def run(self): 'nni': 'src/sdk/pynni/nni', 'nnicmd': 'tools/nnicmd' }, + package_data = {'nni': ['**/requirements.txt']}, python_requires = '>=3.5', install_requires = [ 'astor', diff --git a/src/sdk/pynni/setup.py b/src/sdk/pynni/setup.py index fee463e371..e698995a63 100644 --- a/src/sdk/pynni/setup.py +++ b/src/sdk/pynni/setup.py @@ -37,6 +37,7 @@ def read(fname): 'numpy', 'scipy' ], + package_data = {'nni': ['**/requirements.txt']}, test_suite = 'tests', From 5518c3275296b755d5b8149953708f0af9a49098 Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 16:00:16 +0800 Subject: [PATCH 2/7] update makefile and setup.py --- Makefile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 54d1db1927..9b1f9ecd58 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,12 @@ SHELL := /bin/bash PIP_INSTALL := python3 -m pip install PIP_UNINSTALL := python3 -m pip uninstall +## Colorful output +_INFO := $(shell echo -e '\e[1;36m') +_WARNING := $(shell echo -e '\e[1;33m') +_END := $(shell echo -e '\e[0m') + + ## Install directories ifeq ($(shell id -u), 0) # is root _ROOT := 1 @@ -37,41 +43,37 @@ SERVE_PATH ?= $(INSTALL_PREFIX)/nni/serve ## Check if dependencies have been installed globally ifeq (, $(shell command -v node 2>/dev/null)) - $(info Node.js not found) + $(info $(_INFO) Node.js not found $(_END)) _MISS_DEPS := 1 # node not found else _VER := $(shell node --version) _NEWER := $(shell echo -e "$(NODE_VERSION)\n$(_VER)" | sort -Vr | head -n 1) ifneq ($(_VER), $(_NEWER)) - $(info Node.js version not match) + $(info $(_INFO) Node.js version not match $(_END)) _MISS_DEPS := 1 # node outdated endif endif ifeq (, $(shell command -v yarnpkg 2>/dev/null)) - $(info Yarn not found) + $(info $(_INFO) Yarn not found $(_END)) _MISS_DEPS := 1 # yarn not found endif ifeq (, $(shell command -v serve 2>/dev/null)) - $(info Serve not found) + $(info $(_INFO) Serve not found $(_END)) _MISS_DEPS := 1 # serve not found endif ifdef _MISS_DEPS - $(info Missing dependencies, use local toolchain) + $(info $(_INFO) Missing dependencies, use local toolchain $(_END)) NODE := $(NODE_PATH)/bin/node YARN := PATH=$${PATH}:$(NODE_PATH)/bin $(YARN_PATH)/bin/yarn SERVE := $(SERVE_PATH)/serve else - $(info All dependencies found, use global toolchain) + $(info $(_INFO) All dependencies found, use global toolchain $(_END)) NODE := node YARN := yarnpkg SERVE := serve endif -## Colorful output -_INFO := $(shell echo -e '\e[1;36m') -_WARNING := $(shell echo -e '\e[1;33m') -_END := $(shell echo -e '\e[0m') # Setting variables end From 25dcd8cde1d2b9e49d08b7afd0da508e2a95f091 Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 16:12:06 +0800 Subject: [PATCH 3/7] update document --- README.md | 2 +- docs/GetStarted.md | 6 +++--- docs/RemoteMachineMode.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2c80a13ea..d6fa3f4027 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ pip Installation Prerequisites * git, wget ``` -pip3 install -v --user git+https://github.com/Microsoft/nni.git@v0.1 +python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 source ~/.bashrc ``` diff --git a/docs/GetStarted.md b/docs/GetStarted.md index 177272cd06..c717b18c7c 100644 --- a/docs/GetStarted.md +++ b/docs/GetStarted.md @@ -8,13 +8,13 @@ git wget - python pip should also be correctly installed. You could use "which pip" or "pip -V" to check in Linux. + python pip should also be correctly installed. You could use "python3 -m pip -V" to check in Linux. * Note: we don't support virtual environment in current releases. * __Install NNI through pip__ - pip3 install -v --user git+https://github.com/Microsoft/nni.git@v0.1 + python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 source ~/.bashrc * __Install NNI through source code__ @@ -27,7 +27,7 @@ * __Install NNI for all users__ - sudo pip3 install -v --user git+https://github.com/Microsoft/nni.git@v0.1 + sudo python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 * Note: NNI will be installed to `/usr/share/nni` for all users and to `~/.local/nni` for current user. Respectively, the examples will be copied to `/usr/share/nni/examples` or `~/.local/nni/examples`. * The following tutorial assumes that NNI is installed for current user. diff --git a/docs/RemoteMachineMode.md b/docs/RemoteMachineMode.md index 74006152db..94f393324d 100644 --- a/docs/RemoteMachineMode.md +++ b/docs/RemoteMachineMode.md @@ -15,7 +15,7 @@ For remote machines that are used only to run trials but not the nnictl, you can * __Install python SDK through pip__ - pip3 install --user git+https://github.com/Microsoft/NeuralNetworkIntelligence.git#subdirectory=src/sdk/pynni + python3 -m pip install --user git+https://github.com/Microsoft/NeuralNetworkIntelligence.git#subdirectory=src/sdk/pynni * __Install python SDK through source code__ From 2829fe4f8e742f1b22b9ba31192852ee6585e296 Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 17:11:30 +0800 Subject: [PATCH 4/7] update document --- docs/GetStarted.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/GetStarted.md b/docs/GetStarted.md index c717b18c7c..ff4f9eb246 100644 --- a/docs/GetStarted.md +++ b/docs/GetStarted.md @@ -24,14 +24,6 @@ chmod +x install.sh source install.sh - -* __Install NNI for all users__ - - sudo python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 - - * Note: NNI will be installed to `/usr/share/nni` for all users and to `~/.local/nni` for current user. Respectively, the examples will be copied to `/usr/share/nni/examples` or `~/.local/nni/examples`. - * The following tutorial assumes that NNI is installed for current user. - ## **Quick start: run a customized experiment** An experiment is to run multiple trial jobs, each trial job tries a configuration which includes a specific neural architecture (or model) and hyper-parameter values. To run an experiment through NNI, you should: From 5d660976c107829f741ba61b095309f0bdc94cfe Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 18:22:37 +0800 Subject: [PATCH 5/7] Update Makefile no travis --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9b1f9ecd58..16e9bc209a 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,7 @@ ifdef _MISS_DEPS YARN := PATH=$${PATH}:$(NODE_PATH)/bin $(YARN_PATH)/bin/yarn SERVE := $(SERVE_PATH)/serve else - $(info $(_INFO) All dependencies found, use global toolchain $(_END)) + $(info $(_INFO) All dependencies found, use global toolchain $(_END)) NODE := node YARN := yarnpkg SERVE := serve From 60f9525f0c4b15725f168b243ea0a9b38ce8ffab Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 18:41:56 +0800 Subject: [PATCH 6/7] update doc --- README.md | 2 +- docs/GetStarted.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6fa3f4027..96fdaa17d6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ pip Installation Prerequisites * git, wget ``` -python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 +python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.2 source ~/.bashrc ``` diff --git a/docs/GetStarted.md b/docs/GetStarted.md index ff4f9eb246..5d72dde698 100644 --- a/docs/GetStarted.md +++ b/docs/GetStarted.md @@ -14,7 +14,7 @@ * __Install NNI through pip__ - python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 + python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.2 source ~/.bashrc * __Install NNI through source code__ From 3b793d3f443f5b344eddf54469880a4445ec5937 Mon Sep 17 00:00:00 2001 From: Crysple Date: Thu, 27 Sep 2018 19:02:03 +0800 Subject: [PATCH 7/7] update doc --- README.md | 2 +- docs/GetStarted.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96fdaa17d6..d6fa3f4027 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ pip Installation Prerequisites * git, wget ``` -python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.2 +python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 source ~/.bashrc ``` diff --git a/docs/GetStarted.md b/docs/GetStarted.md index 5d72dde698..ff4f9eb246 100644 --- a/docs/GetStarted.md +++ b/docs/GetStarted.md @@ -14,7 +14,7 @@ * __Install NNI through pip__ - python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.2 + python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.1 source ~/.bashrc * __Install NNI through source code__