Skip to content

Commit 9270b50

Browse files
committed
nightly docs
1 parent af5bc03 commit 9270b50

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ You do not need to repeatedly install after modifying Python files.
122122
In case you want to reinstall, make sure that you uninstall PyTorch first by running `pip uninstall torch`
123123
and `python setup.py clean`. Then you can install in `develop` mode again.
124124

125-
## Nightly Checkout
125+
## Nightly Checkout & Pull
126126

127127
The `tools/nightly_checkout.py` script is provided to ease pure Python development of
128128
PyTorch. This uses conda and git to check out the nightly development version of PyTorch
@@ -132,18 +132,29 @@ or editable install, but without needing the ability to compile any C++ code.
132132
You can use this script to check out a new nightly branch with the following::
133133

134134
```sh
135-
$ ./tools/nightly_checkout.py -b my-nightly-branch
135+
$ ./tools/nightly.py checkout -b my-nightly-branch
136136
$ conda activate pytorch-deps
137137
```
138138

139139
Or if you would like to re-use an existing conda environment, you can pass in
140140
the regular environment parameters (--name or --prefix)::
141141

142142
```sh
143-
$ ./tools/nightly_checkout.py -b my-nightly-branch -n my-env
143+
$ ./tools/nightly.py checkout -b my-nightly-branch -n my-env
144144
$ conda activate my-env
145145
```
146146

147+
You can also use this tool to pull the nightly commits into the current branch as
148+
well. This can be done with
149+
150+
```sh
151+
$ ./tools/nightly.py pull -n my-env
152+
$ conda activate my-env
153+
```
154+
155+
Pulling will reinstalle the conda dependencies as well as the nightly binaries into
156+
the repo directory.
157+
147158
## Codebase structure
148159

149160
* [c10](c10) - Core library files that work everywhere, both server

tools/nightly.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,23 @@
66
77
You can use this script to check out a new nightly branch with the following::
88
9-
$ ./tools/nightly_checkout.py -b my-nightly-branch
9+
$ ./tools/nightly.py checkout -b my-nightly-branch
1010
$ conda activate pytorch-deps
1111
1212
Or if you would like to re-use an existing conda environment, you can pass in
1313
the regular environment parameters (--name or --prefix)::
1414
15-
$ ./tools/nightly_checkout.py -b my-nightly-branch -n my-env
15+
$ ./tools/nightly.py checkout -b my-nightly-branch -n my-env
1616
$ conda activate my-env
17+
18+
You can also use this tool to pull the nightly commits into the current branch as
19+
well. This can be done with
20+
21+
$ ./tools/nightly.py pull -n my-env
22+
$ conda activate my-env
23+
24+
Pulling will reinstalle the conda dependencies as well as the nightly binaries into
25+
the repo directory.
1726
"""
1827
import os
1928
import re
@@ -510,7 +519,7 @@ def write_pth(env_opts, platform):
510519
spdir = _site_packages(env_dir, platform)
511520
pth = os.path.join(spdir, "pytorch-nightly.pth")
512521
s = (
513-
"# This file was autogenerated by PyTorch's tools/nightly_checkout.py\n"
522+
"# This file was autogenerated by PyTorch's tools/nightly.py\n"
514523
"# Please delete this file if you no longer need the following development\n"
515524
"# version of PyTorch to be importable\n"
516525
f"{os.getcwd()}\n"

0 commit comments

Comments
 (0)