Commit bbf4760c authored by Gems Guo's avatar Gems Guo Committed by goooxu
Browse files

Rename the pypi package for nni

parent 30527cf6
...@@ -14,7 +14,7 @@ The targets will be detailed later. ...@@ -14,7 +14,7 @@ The targets will be detailed later.
## Dependencies ## Dependencies
NNI requires at least Node.js, Yarn, and PIP to build, while TypeScript is also recommended. NNI requires at least Node.js, Yarn, and pip to build, while TypeScript is also recommended.
NNI requires Node.js, and all dependency libraries to run. NNI requires Node.js, and all dependency libraries to run.
Required Node.js libraries (including TypeScript) can be installed by Yarn, and required Python libraries can be installed by setuptools or PIP. Required Node.js libraries (including TypeScript) can be installed by Yarn, and required Python libraries can be installed by setuptools or PIP.
......
...@@ -22,16 +22,29 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search ...@@ -22,16 +22,29 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search
## **Install & Verify** ## **Install & Verify**
**pip install** **Install through pip**
* We only support Linux in current stage, Ubuntu 16.04 or higher are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`, `git` and `wget`. * We only support Linux in current stage, Ubuntu 16.04 or higher are tested and supported. Simply run the following `pip install` in an environment that has `python >= 3.5`.
```bash
python3 -m pip install --user nni
``` ```
python3 -m pip install -v --user git+https://github.com/Microsoft/nni.git@v0.2
source ~/.bashrc **Install through source code**
* We only support Linux (Ubuntu 16.04 or higher) in our current stage.
* Run the following commands in an environment that has `python >= 3.5`, `git` and `wget`.
```bash
git clone -b v0.3.0 https://github.com/Microsoft/nni.git
cd nni
source install.sh
``` ```
**verify install** **Verify install**
* The following example is an experiment built on TensorFlow, make sure you have `TensorFlow installed` before running it. * The following example is an experiment built on TensorFlow. Make sure you have **TensorFlow installed** before running it.
* Download the examples via clone the source code.
```bash
cd ~
git clone -b v0.3.0 https://github.com/Microsoft/nni.git
```
* Run the mnist example.
```bash ```bash
nnictl create --config ~/nni/examples/trials/mnist/config.yml nnictl create --config ~/nni/examples/trials/mnist/config.yml
``` ```
......
pool: jobs:
- job: 'Install_through_pip'
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python36:
PYTHON_VERSION: '3.6'
steps:
- script: python3 -m pip install --upgrade pip setuptools
displayName: 'Install python tools'
- script: |
python3 -m pip install nni --user
displayName: 'Install nni toolkit via pip'
- script: |
cd test
PATH=$HOME/.local/bin:$PATH python3 naive_test.py
displayName: 'Integration tests'
- script: |
cd test
PATH=$HOME/.local/bin:$PATH python3 sdk_tuner_test.py
displayName: 'Built-in tuner tests'
- job: 'Install_through_source_code'
pool:
vmImage: 'Ubuntu 16.04' vmImage: 'Ubuntu 16.04'
strategy: strategy:
matrix: matrix:
Python36: Python36:
PYTHON_VERSION: '3.6' PYTHON_VERSION: '3.6'
steps: steps:
- script: python3 -m pip install --upgrade pip setuptools - script: python3 -m pip install --upgrade pip setuptools
displayName: 'Install python tools' displayName: 'Install python tools'
- script: | - script: |
source install.sh source install.sh
displayName: 'Install dependencies' displayName: 'Install nni toolkit via source code'
- script: | - script: |
cd test cd test
export PATH=$HOME/.local/bin:$PATH PATH=$HOME/.local/bin:$PATH python3 naive_test.py
python3 naive_test.py
displayName: 'Integration tests' displayName: 'Integration tests'
- script: | - script: |
cd test cd test
export PATH=$HOME/.local/bin:$PATH PATH=$HOME/.local/bin:$PATH python3 sdk_tuner_test.py
python3 sdk_tuner_test.py
displayName: 'Built-in tuner tests' displayName: 'Built-in tuner tests'
\ No newline at end of file
...@@ -53,7 +53,7 @@ RUN python3 -m pip --no-cache-dir install \ ...@@ -53,7 +53,7 @@ RUN python3 -m pip --no-cache-dir install \
# #
#Install NNI #Install NNI
# #
RUN python3 -m pip install --user nni-pkg RUN python3 -m pip install --user nni
# #
#Tensorflow 1.10.0 #Tensorflow 1.10.0
......
...@@ -10,7 +10,7 @@ with open('../../README.md', 'r') as fh: ...@@ -10,7 +10,7 @@ with open('../../README.md', 'r') as fh:
long_description = fh.read() long_description = fh.read()
setuptools.setup( setuptools.setup(
name = 'nni-pkg', name = 'nni',
version = '0.3.0', version = '0.3.0',
author = 'Microsoft NNI team', author = 'Microsoft NNI team',
author_email = 'nni@microsoft.com', author_email = 'nni@microsoft.com',
...@@ -22,12 +22,12 @@ setuptools.setup( ...@@ -22,12 +22,12 @@ setuptools.setup(
packages = setuptools.find_packages(), packages = setuptools.find_packages(),
python_requires = '>=3.5', python_requires = '>=3.5',
install_requires = [ install_requires = [
'nni', 'nni-sdk',
'schema', 'schema',
'pyyaml', 'pyyaml',
'psutil', 'psutil',
'requests', 'requests',
'paramiko' 'astor'
], ],
classifiers = [ classifiers = [
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* __Install NNI through pip__ * __Install NNI through pip__
python3 -m pip install --user nni-pkg python3 -m pip install --user nni
* __Install NNI through source code__ * __Install NNI through source code__
git clone -b v0.3 https://github.com/Microsoft/nni.git git clone -b v0.3.0 https://github.com/Microsoft/nni.git
cd nni cd nni
source install.sh source install.sh
......
...@@ -8,18 +8,16 @@ ...@@ -8,18 +8,16 @@
git git
wget 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.
* __Install NNI through pip__ * __Install NNI through pip__
pip3 install -v --user git+https://github.com/Microsoft/nni.git@v0.2 python3 -m pip install --user nni
source ~/.bashrc
* __Install NNI through source code__ * __Install NNI through source code__
git clone -b v0.2 https://github.com/Microsoft/nni.git git clone -b v0.3.0 https://github.com/Microsoft/nni.git
cd nni cd nni
chmod +x install.sh
source install.sh source install.sh
## Further reading ## Further reading
......
...@@ -15,7 +15,7 @@ For remote machines that are used only to run trials but not the nnictl, you can ...@@ -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__ * __Install python SDK through pip__
python3 -m pip install --user nni python3 -m pip install --user nni-sdk
* __Install python SDK through source code__ * __Install python SDK through source code__
......
...@@ -15,7 +15,7 @@ For remote machines that are used only to run trials but not the nnictl, you can ...@@ -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__ * __Install python SDK through pip__
python3 -m pip install --user nni python3 -m pip install --user nni-sdk
* __Install python SDK through source code__ * __Install python SDK through source code__
......
pip3 install numpy python3 -m pip install numpy
sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo pip3 install scipy sudo python3 -m pip install scipy
sudo pip3 install sklearn sudo python3 -m pip install sklearn
\ No newline at end of file \ No newline at end of file
...@@ -34,7 +34,7 @@ class CustomInstallCommand(install): ...@@ -34,7 +34,7 @@ class CustomInstallCommand(install):
subprocess.run(['make', 'pip-install'], check=True) subprocess.run(['make', 'pip-install'], check=True)
setup( setup(
name = 'NNI', name = 'nni',
version = '0.3.0', version = '0.3.0',
author = 'Microsoft NNI Team', author = 'Microsoft NNI Team',
author_email = 'nni@microsoft.com', author_email = 'nni@microsoft.com',
......
...@@ -56,7 +56,7 @@ if python3 -c 'import nni' > /dev/null 2>&1; then ...@@ -56,7 +56,7 @@ if python3 -c 'import nni' > /dev/null 2>&1; then
return return
else else
# Install nni # Install nni
python3 -m pip install --user nni-pkg python3 -m pip install --user nni
fi`; fi`;
export const PAI_TRIAL_COMMAND_FORMAT: string = export const PAI_TRIAL_COMMAND_FORMAT: string =
......
...@@ -26,7 +26,7 @@ def read(fname): ...@@ -26,7 +26,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read() return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()
setuptools.setup( setuptools.setup(
name = 'nni', name = 'nni-sdk',
version = '0.3.0', version = '0.3.0',
packages = setuptools.find_packages(exclude=['tests']), packages = setuptools.find_packages(exclude=['tests']),
......
...@@ -11,7 +11,7 @@ python >= 3.5 ...@@ -11,7 +11,7 @@ python >= 3.5
1. Enter tools directory 1. Enter tools directory
2. Use pip3 to install packages 2. Use pip to install packages
* Install for current user: * Install for current user:
python3 -m pip install --user -e . python3 -m pip install --user -e .
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment