Skip to content

Commit

Permalink
Rename the pypi package for nni
Browse files Browse the repository at this point in the history
  • Loading branch information
Gems Guo authored and goooxu committed Nov 2, 2018
1 parent 30527cf commit bbf4760
Show file tree
Hide file tree
Showing 14 changed files with 76 additions and 41 deletions.
2 changes: 1 addition & 1 deletion README.Makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The targets will be detailed later.

## 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.
Required Node.js libraries (including TypeScript) can be installed by Yarn, and required Python libraries can be installed by setuptools or PIP.
Expand Down
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,29 @@ The tool dispatches and runs trial jobs generated by tuning algorithms to search

## **Install & Verify**

**pip install**
* 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`.

**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`.
```bash
python3 -m pip install --user nni
```
python3 -m pip install -v --user git+https://github.com/Microsoft/[email protected]
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**
* The following example is an experiment built on TensorFlow, make sure you have `TensorFlow installed` before running it.
**Verify install**
* 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
nnictl create --config ~/nni/examples/trials/mnist/config.yml
```
Expand Down
50 changes: 37 additions & 13 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python36:
PYTHON_VERSION: '3.6'
jobs:

steps:
- 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: |
source install.sh
displayName: 'Install dependencies'
python3 -m pip install nni --user
displayName: 'Install nni toolkit via pip'
- script: |
cd test
export PATH=$HOME/.local/bin:$PATH
python3 naive_test.py
PATH=$HOME/.local/bin:$PATH python3 naive_test.py
displayName: 'Integration tests'
- script: |
cd test
export PATH=$HOME/.local/bin:$PATH
python3 sdk_tuner_test.py
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'
strategy:
matrix:
Python36:
PYTHON_VERSION: '3.6'

steps:
- script: python3 -m pip install --upgrade pip setuptools
displayName: 'Install python tools'
- script: |
source install.sh
displayName: 'Install nni toolkit via source code'
- 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'
2 changes: 1 addition & 1 deletion deployment/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ RUN python3 -m pip --no-cache-dir install \
#
#Install NNI
#
RUN python3 -m pip install --user nni-pkg
RUN python3 -m pip install --user nni

#
#Tensorflow 1.10.0
Expand Down
6 changes: 3 additions & 3 deletions deployment/pypi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
long_description = fh.read()

setuptools.setup(
name = 'nni-pkg',
name = 'nni',
version = '0.3.0',
author = 'Microsoft NNI team',
author_email = '[email protected]',
Expand All @@ -22,12 +22,12 @@
packages = setuptools.find_packages(),
python_requires = '>=3.5',
install_requires = [
'nni',
'nni-sdk',
'schema',
'pyyaml',
'psutil',
'requests',
'paramiko'
'astor'
],
classifiers = [
'Programming Language :: Python :: 3',
Expand Down
4 changes: 2 additions & 2 deletions docs/GetStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

* __Install NNI through pip__

python3 -m pip install --user nni-pkg
python3 -m pip install --user nni

* __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
source install.sh

Expand Down
8 changes: 3 additions & 5 deletions docs/InstallNNI_Ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,16 @@
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.

* __Install NNI through pip__

pip3 install -v --user git+https://github.com/Microsoft/[email protected]
source ~/.bashrc
python3 -m pip install --user nni

* __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
chmod +x install.sh
source install.sh

## Further reading
Expand Down
2 changes: 1 addition & 1 deletion docs/RemoteMachineMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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__

python3 -m pip install --user nni
python3 -m pip install --user nni-sdk

* __Install python SDK through source code__

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial_2_RemoteMachineMode.md
Original file line number Diff line number Diff line change
Expand Up @@ -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__

python3 -m pip install --user nni
python3 -m pip install --user nni-sdk

* __Install python SDK through source code__

Expand Down
6 changes: 3 additions & 3 deletions examples/trials/sklearn/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip3 install numpy
python3 -m pip install numpy
sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
sudo pip3 install scipy
sudo pip3 install sklearn
sudo python3 -m pip install scipy
sudo python3 -m pip install sklearn
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run(self):
subprocess.run(['make', 'pip-install'], check=True)

setup(
name = 'NNI',
name = 'nni',
version = '0.3.0',
author = 'Microsoft NNI Team',
author_email = '[email protected]',
Expand Down
2 changes: 1 addition & 1 deletion src/nni_manager/training_service/pai/paiData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if python3 -c 'import nni' > /dev/null 2>&1; then
return
else
# Install nni
python3 -m pip install --user nni-pkg
python3 -m pip install --user nni
fi`;

export const PAI_TRIAL_COMMAND_FORMAT: string =
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/pynni/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf-8').read()

setuptools.setup(
name = 'nni',
name = 'nni-sdk',
version = '0.3.0',
packages = setuptools.find_packages(exclude=['tests']),

Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python >= 3.5

1. Enter tools directory

2. Use pip3 to install packages
2. Use pip to install packages
* Install for current user:

python3 -m pip install --user -e .
Expand Down

0 comments on commit bbf4760

Please sign in to comment.