[functorch] fix testing warning, update readme

This commit is contained in:
Richard Zou
2021-04-28 07:39:29 -07:00
committed by Jon Janzen
parent 42843306ab
commit 0abba43aa3
2 changed files with 6 additions and 5 deletions

View File

@ -39,8 +39,8 @@ Coming soon!
`functorch` is a PyTorch C++ Extension module. To install,
- Install [PyTorch from source](https://github.com/pytorch/pytorch#from-source).
Be sure to make sure the changes from https://github.com/pytorch/pytorch/pull/56824
are on the branch. TODO: we should recommend a commit hash that is known to be stable
8134806e23 is a known commit that this project works with; commits after that
should be fine but haven't been formally tested.
- Run `python setup.py install`. You can use `DEBUG=1` to compile in debug mode.
Then, try to run some tests to make sure all is OK:

View File

@ -27,9 +27,10 @@ try:
import torchvision
USE_TORCHVISION = True
except:
warnings.warn("Couldn't import torchvision. Some of our tests use it, try ",
"to install it with commands from pytorch.org, post-fixed with ",
"`--no-deps` to avoid overwriting the pytorch installation")
warnings.warn("Couldn't import torchvision. Some of our tests use it, try "
"to install it with commands from pytorch.org, post-fixed with "
"`--no-deps` to avoid overwriting the pytorch installation",
UserWarning)
class TestGradTransform(TestCase):