This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
47 undefined variable errors with Pylint #11904
Copy link
Copy link
Closed
Description
Description
Running Pylint on incubator-mxnet with undefined-variable enabled, results in 52 errors. This could lead to NameError on execution.
Steps to reproduce
What to do:
1. Edit the enable section of tests/ci_build/pylintrc to include undefined-variable
2. Run
find . -name "*.py" -exec pylint --rcfile=${ROOT_DIR}/tests/ci_build/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" --msg-template='{path}({line}): [{msg_id} {obj}] {msg}' -E '{}' +
from the root directory on your machine.
3. Look for Errors with code E0602 or having the text Undefined variable
Package used (Python/R/Scala/Julia):
I'm using Python2
Build info (Required if built from source)
MXNet commit hash:
f5b95b0
Error Message:
| Code/module affected | Undefined variable |
|---|---|
| ./docs/mxdoc.py:75:16: | root_path |
| ./example/autoencoder/model.py:25:8: | ModuleNotFoundError |
| ./example/deep-embedded-clustering/model.py:25:8: | ModuleNotFoundError |
| ./example/fcn-xs/image_segmentaion.py:100:60: | ctx |
| ./example/fcn-xs/image_segmentaion.py:103:60: | ctx |
| ./example/fcn-xs/image_segmentaion.py:104:26: | ctx |
| ./example/neural-style/end_to_end/model_vgg19.py:94:17: | out |
| ./example/neural-style/end_to_end/model_vgg19.py:105:16: | out |
| ./example/profiler/profiler_executor.py:89:15: | search_plan |
| ./example/profiler/profiler_executor.py:89:37: | data_shapes |
| ./example/reinforcement-learning/a3c/a3c.py:206:16: | robo_data |
| ./example/sparse/factorization_machine/metric.py:111:22: | label_zero_num |
| ./example/sparse/factorization_machine/metric.py:111:39: | label_one_num |
| ./example/ssd/dataset/pycocotools/coco.py:266:41: | m |
| ./example/ssd/dataset/pycocotools/coco.py:266:53: | m |
| ./example/ssd/dataset/pycocotools/coco.py:273:52: | m |
| ./example/ssd/dataset/pycocotools/coco.py:435:16: | m |
| ./example/ssd/symbol/common.py:209:23: | start_offset |
| ./example/ssd/symbol/common.py:210:46: | start_offset |
| ./python/mxnet/initializer.py:700:20: | _INITIALIZER_REGISTRY |
| ./tools/flakiness_checker.py:69:11: | FileNotFoundError |
| ./example/gluon/image_classification.py:143:31 | get_cifar10_iterator |
| ./example/gluon/image_classification.py:152:31 | get_imagenet_iterator |
| ./example/gluon/image_classification.py:155:31 | get_caltech101_iterator |
| ./example/gluon/image_classification.py:158:31 | dummy_iterator |
| ./example/reinforcement-learning/dqn/atari_game.py:37:10 | get_numpy_rng |
| ./example/reinforcement-learning/dqn/atari_game.py:72:19 | get_numpy_rng |
| ./example/reinforcement-learning/dqn/base.py:98:35 | get_bucket_key |
| ./example/reinforcement-learning/dqn/base.py:161:28 | save_params |
| ./example/reinforcement-learning/dqn/base.py:164:27 | save_misc |
| ./example/reinforcement-learning/dqn/base.py:170:49 | load_params |
| ./example/reinforcement-learning/dqn/dqn_demo.py:33:27 | sys |
| ./example/reinforcement-learning/dqn/dqn_demo.py:39:10 | get_numpy_rng |
| ./example/reinforcement-learning/dqn/dqn_demo.py:90:10 | parse_ctx |
| ./example/reinforcement-learning/dqn/dqn_demo.py:138:16 | time |
| ./example/reinforcement-learning/dqn/dqn_demo.py:147:33 | time |
| ./example/reinforcement-learning/dqn/dqn_demo.py:221:31 | time |
| ./example/reinforcement-learning/dqn/dqn_demo.py:235:14 | time |
| ./example/reinforcement-learning/dqn/dqn_run_test.py | get_numpy_rng |
| ./example/reinforcement-learning/dqn/replay_memory.py:31:19 | get_numpy_rng |
| ./tests/python/mkl/test_mkldnn.py:264:4 | test_mkldnn_install |
| ./example/rnn/word_lm/train.py:91:32 | rnn |
| ./example/rnn/word_lm/train.py:93:11 | softmax_ce_loss |
| ./example/sparse/factorization_machine/train.py:102:12 | factorization_machine_model |
| ./example/sparse/wide_deep/train.py:75:40 | get_uci_adult |
| ./example/sparse/wide_deep/train.py:76:34 | get_uci_adult |
| ./example/sparse/wide_deep/train.py:78:12 | wide_deep_model |
What have you tried to solve it?
- Solving the errors one by one
marcoabreu, sandeep-krishnamurthy and cclauss