Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Undefined name: 'AttribDataset' on lines 137, 142, and 304 #52

Merged
merged 1 commit into from
Apr 12, 2019

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Apr 12, 2019

flake8 testing of https://github.com/facebookresearch/pytorch_GAN_zoo on Python 3.7.1

$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

./models/trainer/DCGAN_trainer.py:19:16: F821 undefined name 'PPGANTrainer'
        return PPGANTrainer._defaultConfig
               ^
./models/metrics/nn_score.py:136:15: F821 undefined name 'AttribDataset'
    dataset = AttribDataset(pathDB, transform=transform,
              ^
./models/metrics/nn_score.py:141:25: F821 undefined name 'AttribDataset'
    validationDataset = AttribDataset(pathDB, transform=transform,
                        ^
./models/metrics/nn_score.py:303:19: F821 undefined name 'AttribDataset'
        dataset = AttribDataset(pathDB, transform=transform,
                  ^
4     F821 undefined name 'AttribDataset'
4

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

[flake8](http://flake8.pycqa.org) testing of https://github.com/facebookresearch/pytorch_GAN_zoo on Python 3.7.1

$ __flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics__
```
./models/trainer/DCGAN_trainer.py:19:16: F821 undefined name 'PPGANTrainer'
        return PPGANTrainer._defaultConfig
               ^
./models/metrics/nn_score.py:136:15: F821 undefined name 'AttribDataset'
    dataset = AttribDataset(pathDB, transform=transform,
              ^
./models/metrics/nn_score.py:141:25: F821 undefined name 'AttribDataset'
    validationDataset = AttribDataset(pathDB, transform=transform,
                        ^
./models/metrics/nn_score.py:303:19: F821 undefined name 'AttribDataset'
        dataset = AttribDataset(pathDB, transform=transform,
                  ^
4     F821 undefined name 'AttribDataset'
4
```
__E901,E999,F821,F822,F823__ are the "_showstopper_" [flake8](http://flake8.pycqa.org) issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.
* F821: undefined name `name`
* F822: undefined name `name` in `__all__`
* F823: local variable name referenced before assignment
* E901: SyntaxError or IndentationError
* E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 12, 2019
@Molugan
Copy link
Contributor

Molugan commented Apr 12, 2019

Thanks !

@Molugan Molugan merged commit 73e5c2b into facebookresearch:master Apr 12, 2019
@cclauss cclauss deleted the patch-1 branch April 12, 2019 11:35
@cclauss
Copy link
Contributor Author

cclauss commented Apr 12, 2019

I could not solve this one...

flake8 testing of https://github.com/facebookresearch/pytorch_GAN_zoo on Python 3.7.1

$ flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

./models/trainer/DCGAN_trainer.py:19:16: F821 undefined name 'PPGANTrainer'
        return PPGANTrainer._defaultConfig
               ^
1     F821 undefined name 'PPGANTrainer'
1

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants