Commit Graph

12 Commits

Author SHA1 Message Date
Yangqing Jia
c47f680086 arc lint torch/utils (#13141)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/13141

This is an example diff to show what lint rules are being applied.

Reviewed By: mingzhe09088

Differential Revision: D10858478

fbshipit-source-id: cbeb013f10f755b0095478adf79366e7cf7836ff
2018-10-25 14:59:03 -07:00
peter
9b0cece9b0 Enable the general usage of _download_url_to_file (#9090)
Summary:
A requirement for the fix on https://github.com/pytorch/examples/issues/378.
Closes https://github.com/pytorch/pytorch/pull/9090

Reviewed By: goldsborough

Differential Revision: D8712254

Pulled By: ezyang

fbshipit-source-id: b28765f24d891890e9d88757ee4ec704e38e6af7
2018-07-02 19:55:39 -07:00
jfan-uber
f06fcc6efa Fix bug that introduced in pull #3280 (#7292)
Apparently get() is a function of requests, not a module (not sure if in
the past get() used to be a module). Therefore, the syntax in #3280 will
alway fail with ImportError, and requests lib will never be used (kind
of defeat the purpose of that pull request).
Also, if requests lib is used, should add stream=True parameter,
otherwise requests.get() will load the whole response into memory.
2018-05-04 14:14:02 -07:00
Kento NOZAWA
3b58b859b2 Fix typos in docs (#6389) 2018-04-07 12:41:15 -04:00
Adam Paszke
2f27c1b56b
Revert "Fix ImportError with requests in model_zoo (#5896)" (#5909)
This reverts commit 21ce93e88f.
2018-03-20 17:35:03 +01:00
Cory Lorenz
21ce93e88f Fix ImportError with requests in model_zoo (#5896)
Not sure if this is a backwards compatibility issue. 
```
Python 2.7.9 (default, Apr  2 2015, 15:35:35) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests.get as urlopen
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named get
>>> from requests import get as urlopen
>>> 
```
2018-03-20 09:51:34 +01:00
bddppq
d8d82d14cf Add an option to suppress download progress (#4135)
* Add an option to suppress download progress

* Add a disable option to pbar to make it a no-op

* Document progress
2017-12-14 22:19:27 -05:00
Alykhan Tejani
429d66549e If available try to use requests instead of urllib for model_zoo.load_url (#3280)
* try to use requests instead of urllib for load_url if available

* add noqa to silence flake warnings

* remove urllib import into the except
2017-10-31 08:53:58 -04:00
SunYeop Lee
ae65236490 Fix typo 2017-07-04 15:19:05 -04:00
Bart Olsthoorn
79d4ac670c Add map_location to load_url (#1418) 2017-05-01 10:21:30 -04:00
Luke Yeager
e7c1e6a8e3 [pep8] Fix most lint automatically with autopep8
Here's the command I used to invoke autopep8 (in parallel!):

    git ls-files | grep '\.py$' | xargs -n1 -P`nproc` autopep8 -i

Several rules are ignored in setup.cfg. The goal is to let autopep8
handle everything which it can handle safely, and to disable any rules
which are tricky or controversial to address. We may want to come back
and re-enable some of these rules later, but I'm trying to make this
patch as safe as possible.

Also configures flake8 to match pep8's behavior.

Also configures TravisCI to check the whole project for lint.
2017-01-28 01:15:51 +01:00
Sam Gross
c9ec7fad52 Add model_zoo utility torch torch.utils (#424)
This was originally part of a torchvision PR, but I think it will be
useful outside vision, such as for distributing word embeddings.
2017-01-09 13:16:58 -05:00