Closed cclauss closed 6 years ago
async is a reserved word in Python 3.7 so cuda is deprecating the function parameter async in favor of __non_blocking__.
https://github.com/pytorch/pytorch/blob/4d28b65fb8978f1c34765d56f18c07042e70a43a/torch/_utils.py#L20-L21
flake8 testing of https://github.com/facebookresearch/ParlAI on Python 3.7.0
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./projects/personachat/persona_seq2seq.py:2220:43: E999 SyntaxError: invalid syntax self.zs.copy_(zs, async=True) ^ ./parlai/agents/vsepp_caption/vsepp_caption.py:160:38: E999 SyntaxError: invalid syntax images = images.cuda(async=True) ^ ./parlai/agents/drqa/model.py:89:43: E999 SyntaxError: invalid syntax inputs = [Variable(e.cuda(async=True)) for e in ex[:5]] ^ 3 E999 SyntaxError: invalid syntax 3
test our product and tell friends
async is a reserved word in Python 3.7 so cuda is deprecating the function parameter async in favor of __non_blocking__.
https://github.com/pytorch/pytorch/blob/4d28b65fb8978f1c34765d56f18c07042e70a43a/torch/_utils.py#L20-L21
flake8 testing of https://github.com/facebookresearch/ParlAI on Python 3.7.0
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics