Skip to content

'async' is a reserved word in Python 3.7 #3

@cclauss

Description

@cclauss

'async' is a reserved word in Python 3.7. Cuda has shifted to 'non_blocking' instead. pytorch/pytorch#4999

flake8 testing of https://github.com/Scitator/prometheus on Python 3.7.0

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./losses/unet.py:8:23: E999 SyntaxError: invalid syntax
    return x.cuda(async=True) if torch.cuda.is_available() else x
                      ^
1     E999 SyntaxError: invalid syntax
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions