Polish the nightly.py docs in CONTRIBUTING a little (#43494)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/43494

Reviewed By: mruberry

Differential Revision: D23296032

Pulled By: ngimel

fbshipit-source-id: c85a6d4c39cbb60644f79136a6f21fd49c813b61
This commit is contained in:
Ralf Gommers 2020-08-25 12:03:47 -07:00 committed by Facebook GitHub Bot
parent 3dcfe84861
commit ebc0fc4dfc

View file

@ -124,36 +124,36 @@ and `python setup.py clean`. Then you can install in `develop` mode again.
## Nightly Checkout & Pull
The `tools/nightly_checkout.py` script is provided to ease pure Python development of
PyTorch. This uses conda and git to check out the nightly development version of PyTorch
and installs pre-built binaries into the current repository. This is like a development
or editable install, but without needing the ability to compile any C++ code.
The `tools/nightly.py` script is provided to ease pure Python development of
PyTorch. This uses `conda` and `git` to check out the nightly development
version of PyTorch and installs pre-built binaries into the current repository.
This is like a development or editable install, but without needing the ability
to compile any C++ code.
You can use this script to check out a new nightly branch with the following::
You can use this script to check out a new nightly branch with the following:
```sh
$ ./tools/nightly.py checkout -b my-nightly-branch
$ conda activate pytorch-deps
```bash
./tools/nightly.py checkout -b my-nightly-branch
conda activate pytorch-deps
```
Or if you would like to re-use an existing conda environment, you can pass in
the regular environment parameters (--name or --prefix)::
the regular environment parameters (`--name` or `--prefix`):
```sh
$ ./tools/nightly.py checkout -b my-nightly-branch -n my-env
$ conda activate my-env
```bash
./tools/nightly.py checkout -b my-nightly-branch -n my-env
conda activate my-env
```
You can also use this tool to pull the nightly commits into the current branch as
well. This can be done with
You can also use this tool to pull the nightly commits into the current branch:
```sh
$ ./tools/nightly.py pull -n my-env
$ conda activate my-env
```bash
./tools/nightly.py pull -n my-env
conda activate my-env
```
Pulling will reinstalle the conda dependencies as well as the nightly binaries into
the repo directory.
Pulling will reinstall the PyTorch dependencies as well as the nightly binaries
into the repo directory.
## Codebase structure