toandaominh1997 / EfficientDet.Pytorch

Implementation EfficientDet: Scalable and Efficient Object Detection in PyTorch
MIT License
1.44k stars 306 forks source link

Undefined name: from functools import partial #69

Closed cclauss closed 4 years ago

cclauss commented 4 years ago

flake8 testing of https://github.com/toandaominh1997/EfficientDet.Pytorch on Python 3.8.0

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

./eval.py:81:32: F821 undefined name 'device'
            images = images.to(device)
                               ^
./eval.py:82:42: F821 undefined name 'device'
            annotations = annotations.to(device)
                                         ^
./utils/vis_bbox.py:107:26: F821 undefined name 'label_names'
            label_names= label_names
                         ^
./models/bifpn.py:91:17: F821 undefined name 'xavier_init'
                xavier_init(m, distribution='uniform')
                ^
./models/bifpn.py:167:17: F821 undefined name 'xavier_init'
                xavier_init(m, distribution='uniform')
                ^
./models/retinahead.py:8:13: F821 undefined name 'partial'
    pfunc = partial(func, **kwargs) if kwargs else func
            ^
6     F821 undefined name 'device'
6

https://flake8.pycqa.org/en/latest/user/error-codes.html

On the flake8 test selection, this PR does not focus on "style violations" (the majority of flake8 error codes that psf/black can autocorrect). Instead these tests are focus on runtime safety and correctness:

cclauss commented 4 years ago

One issue remains: https://app.circleci.com/jobs/github/toandaominh1997/EfficientDet.Pytorch/58