Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
cclauss opened this issue Nov 22, 2018 · 1 comment
Closed

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

cclauss opened this issue Nov 22, 2018 · 1 comment

Comments

@cclauss
Copy link
Contributor

cclauss commented Nov 22, 2018

flake8 testing of https://github.com/jantic/DeOldify on Python 3.7.1

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

./fastai/core.py:37:32: E999 SyntaxError: invalid syntax
    if cuda: a = to_gpu(a, async=True)
                               ^
./fastai/models/inceptionresnetv2.py:316:20: F821 undefined name 'pretrained_settings'
        settings = pretrained_settings['inceptionresnetv2'][pretrained]
                   ^
./fastai/models/inceptionresnetv2.py:321:17: F821 undefined name 'InceptionResNetV2'
        model = InceptionResNetV2(num_classes=1001)
                ^
./fastai/models/inceptionresnetv2.py:337:17: F821 undefined name 'InceptionResNetV2'
        model = InceptionResNetV2(num_classes=num_classes)
                ^
./fastai/models/cifar10/main_dxy.py:179:32: E999 SyntaxError: invalid syntax
      target = target.cuda(async=True)
                               ^
./fastai/models/cifar10/utils.py:114:32: F821 undefined name 'random'
  return string + '-{}'.format(random.randint(1, 10000))
                               ^
./fastai/models/cifar10/utils_kuangliu.py:17:18: F821 undefined name 'torch'
    dataloader = torch.utils.data.DataLoader(dataset, batch_size=1, shuffle=True, num_workers=2)
                 ^
./fastai/models/cifar10/utils_kuangliu.py:18:12: F821 undefined name 'torch'
    mean = torch.zeros(3)
           ^
./fastai/models/cifar10/utils_kuangliu.py:19:11: F821 undefined name 'torch'
    std = torch.zeros(3)
          ^
2     E999 SyntaxError: invalid syntax
7     F821 undefined name 'random'
9
@jantic
Copy link
Owner

jantic commented Nov 26, 2018

Forgot to close this- merged this in a few days ago.

@jantic jantic closed this as completed Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants