This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support dev install on windows (#2416)
update development document.
- Loading branch information
1 parent
8e1b765
commit b3a085d
Showing
3 changed files
with
126 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,59 @@ | ||
**Set up NNI developer environment** | ||
# Setup NNI development environment | ||
|
||
=== | ||
NNI development environment supports Ubuntu 1604 (or above), and Windows 10 with Python3 64bit. | ||
|
||
## Best practice for debug NNI source code | ||
## Installation | ||
|
||
For debugging NNI source code, your development environment should be under Ubuntu 16.04 (or above) system with python 3 and pip 3 installed, then follow the below steps. | ||
The installation steps are similar with installing from source code. But the installation links to code directory, so that code changes can be applied to installation as easy as possible. | ||
|
||
### 1. Clone the source code | ||
### 1. Clone source code | ||
|
||
Run the command | ||
|
||
``` | ||
```bash | ||
git clone https://github.com/Microsoft/nni.git | ||
``` | ||
|
||
to clone the source code | ||
Note, if you want to contribute code back, it needs to fork your own NNI repo, and clone from there. | ||
|
||
### 2. Prepare the debug environment and install dependencies | ||
### 2. Install from source code | ||
|
||
Change directory to the source code folder, then run the command | ||
#### Ubuntu | ||
|
||
```bash | ||
make dev-easy-install | ||
``` | ||
make install-dependencies | ||
``` | ||
|
||
to install the dependent tools for the environment | ||
|
||
### 3. Build source code | ||
|
||
Run the command | ||
#### Windows | ||
|
||
```bat | ||
powershell -ExecutionPolicy Bypass -file install.ps1 -Development | ||
``` | ||
make build | ||
``` | ||
|
||
to build the source code | ||
|
||
### 4. Install NNI to development environment | ||
|
||
Run the command | ||
|
||
``` | ||
make dev-install | ||
``` | ||
|
||
to install the distribution content to development environment, and create cli scripts | ||
|
||
### 5. Check if the environment is ready | ||
### 3. Check if the environment is ready | ||
|
||
Now, you can try to start an experiment to check if your environment is ready. | ||
For example, run the command | ||
|
||
``` | ||
nnictl create --config ~/nni/examples/trials/mnist-tfv1/config.yml | ||
```bash | ||
nnictl create --config examples/trials/mnist-tfv1/config.yml | ||
``` | ||
|
||
And open WebUI to check if everything is OK | ||
|
||
### 6. Redeploy | ||
|
||
After the code changes, it may need to redeploy. It depends on what kind of code changed. | ||
### 4. Reload changes | ||
|
||
#### Python | ||
|
||
It doesn't need to redeploy, but the nnictl may need to be restarted. | ||
Nothing to do, the code is already linked to package folders. | ||
|
||
#### TypeScript | ||
|
||
* If `src/nni_manager` is changed, run `yarn watch` continually under this folder. It will rebuild code instantly. The nnictl may need to be restarted to reload NNI manager. | ||
* If `src/nni_manager` is changed, run `yarn watch` under this folder. It will watch and build code continually. The `nnictl` need to be restarted to reload NNI manager. | ||
* If `src/webui` or `src/nasui` are changed, run `yarn start` under the corresponding folder. The web UI will refresh automatically if code is changed. | ||
|
||
### 5. Submit Pull Request | ||
|
||
All changes are merged to master branch from your forked repo. The description of Pull Request must be meaningful, and useful. | ||
|
||
We will review the changes as soon as possible. Once it passes review, we will merge it to master branch. | ||
|
||
--- | ||
At last, wish you have a wonderful day. | ||
For more contribution guidelines on making PR's or issues to NNI source code, you can refer to our [Contributing](Contributing.md) document. | ||
For more contribution guidelines and coding styles, you can refer to the [contributing document](Contributing.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters