unifiedparsing icon indicating copy to clipboard operation
unifiedparsing copied to clipboard

'async' is a reserved word in Python >= 3.7

Open cclauss opened this issue 6 years ago • 2 comments
trafficstars

Same problem and recommended fix as CSAILVision/semantic-segmentation-pytorch#125

flake8 testing of https://github.com/CSAILVision/unifiedparsing on Python 3.7.1

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

./lib/nn/parallel/data_parallel.py:16:31: E999 SyntaxError: invalid syntax
        v = obj.cuda(dev, async=True)
                              ^
./models/models.py:163:27: F821 undefined name 'ResnetDilated'
            net_encoder = ResnetDilated(orig_resnet,
                          ^
./models/models.py:168:27: F821 undefined name 'ResnetDilated'
            net_encoder = ResnetDilated(orig_resnet,
                          ^
1     E999 SyntaxError: invalid syntax
2     F821 undefined name 'ResnetDilated'
3

cclauss avatar Nov 30 '18 06:11 cclauss

the same problem. Change to non_blocking works ! Thanks !

drmeerkat avatar Mar 26 '19 06:03 drmeerkat

@hangzhaomit Your review please.

cclauss avatar Mar 26 '19 06:03 cclauss