{"action":"closed","issue":{"url":"https://api.github.com/repos/apache/incubator-mxnet/issues/8270","repository_url":"https://api.github.com/repos/apache/incubator-mxnet","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/8270/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/8270/comments","events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/8270/events","html_url":"https://github.com/apache/incubator-mxnet/issues/8270","id":265471110,"node_id":"MDU6SXNzdWUyNjU0NzExMTA=","number":8270,"title":"5 undefined names in Python code","user":{"login":"cclauss","id":3709715,"node_id":"MDQ6VXNlcjM3MDk3MTU=","avatar_url":"https://avatars3.githubusercontent.com/u/3709715?v=4","gravatar_id":"","url":"https://api.github.com/users/cclauss","html_url":"https://github.com/cclauss","followers_url":"https://api.github.com/users/cclauss/followers","following_url":"https://api.github.com/users/cclauss/following{/other_user}","gists_url":"https://api.github.com/users/cclauss/gists{/gist_id}","starred_url":"https://api.github.com/users/cclauss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cclauss/subscriptions","organizations_url":"https://api.github.com/users/cclauss/orgs","repos_url":"https://api.github.com/users/cclauss/repos","events_url":"https://api.github.com/users/cclauss/events{/privacy}","received_events_url":"https://api.github.com/users/cclauss/received_events","type":"User","site_admin":false},"labels":[{"id":206159502,"node_id":"MDU6TGFiZWwyMDYxNTk1MDI=","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/Bug","name":"Bug","color":"fc2929","default":false},{"id":707556117,"node_id":"MDU6TGFiZWw3MDc1NTYxMTc=","url":"https://api.github.com/repos/apache/incubator-mxnet/labels/Python","name":"Python","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2017-10-14T07:14:07Z","updated_at":"2018-08-23T18:43:06Z","closed_at":"2018-08-23T18:43:06Z","author_association":"CONTRIBUTOR","body":"Undefined names can raise NameError at runtime.\r\n\r\nflake8 testing of https://github.com/apache/incubator-mxnet on Python 2.7.14\r\n\r\n$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__\r\n```\r\n./docs/mxdoc.py:71:16: F821 undefined name 'root_path'\r\n    pdf_path = root_path + '/docs/api/r/mxnet-r-reference-manual.pdf'\r\n               ^\r\n\r\n./example/cnn_chinese_text_classification/data_helpers.py:199:13: F821 undefined name 'word2vec'\r\n    model = word2vec.Word2Vec.load_word2vec_format(path, binary=True)\r\n            ^\r\n\r\n./example/cnn_text_classification/data_helpers.py:184:13: F821 undefined name 'word2vec'\r\n    model = word2vec.Word2Vec.load_word2vec_format(path, binary=True)\r\n            ^\r\n\r\n./example/fcn-xs/solver.py:66:32: F821 undefined name 'nd'\r\n        self.aux_params = {k : nd.zeros(s) for k, s in zip(aux_names, aux_shapes)}\r\n                               ^\r\n\r\n./example/gluon/style_transfer/utils.py:150:59: F821 undefined name 'collections'\r\n        assert isinstance(size, int) or (isinstance(size, collections.Iterable) and len(size) == 2)\r\n                                                          ^\r\n\r\n./example/gluon/tree_lstm/dataset.py:85:16: F821 undefined name 'BOS'\r\n        vec = [BOS] if add_bos else []\r\n               ^\r\n\r\n./example/gluon/tree_lstm/dataset.py:88:24: F821 undefined name 'EOS'\r\n            vec.append(EOS)\r\n                       ^\r\n\r\n./example/model-parallel-lstm/lstm.py:457:8: F821 undefined name 'concat_decode'\r\n    if concat_decode:\r\n       ^\r\n\r\n./example/module/lstm_bucketing.py:70:22: F821 undefined name 'DummyIter'\r\n        data_train = DummyIter(data_train)\r\n                     ^\r\n\r\n./example/module/lstm_bucketing.py:71:20: F821 undefined name 'DummyIter'\r\n        data_val = DummyIter(data_val)\r\n                   ^\r\n\r\n./example/module/train_cifar10.py:181:28: F821 undefined name 'epoch_size'\r\n            step = max(int(epoch_size * args.lr_factor_epoch), 1),\r\n                           ^\r\n\r\n./example/neural-style/end_to_end/model_vgg19.py:94:17: F821 undefined name 'out'\r\n    arg_names = out.list_arguments()\r\n                ^\r\n\r\n./example/neural-style/end_to_end/model_vgg19.py:105:16: F821 undefined name 'out'\r\n    executor = out.bind(ctx=ctx, args=arg_dict, args_grad=[], grad_req=\"null\")\r\n               ^\r\n\r\n./example/profiler/profiler_executor.py:89:15: F821 undefined name 'search_plan'\r\n        sym = search_plan(sym, data=data_shapes)\r\n              ^\r\n\r\n./example/profiler/profiler_executor.py:89:37: F821 undefined name 'data_shapes'\r\n        sym = search_plan(sym, data=data_shapes)\r\n                                    ^\r\n\r\n./example/reinforcement-learning/a3c/a3c.py:201:16: F821 undefined name 'robo_data'\r\n    dataiter = robo_data.RobosimsDataIter('scenes', args.batch_size, args.input_length, web_viz=True)\r\n               ^\r\n\r\n./example/reinforcement-learning/a3c/rl_data.py:134:20: F821 undefined name 'Empty'\r\n            except Empty:\r\n                   ^\r\n\r\n./example/rnn/old/gru_bucketing.py:69:22: F821 undefined name 'DummyIter'\r\n        data_train = DummyIter(data_train)\r\n                     ^\r\n\r\n./example/rnn/old/gru_bucketing.py:70:20: F821 undefined name 'DummyIter'\r\n        data_val = DummyIter(data_val)\r\n                   ^\r\n\r\n./example/rnn/old/lstm_bucketing.py:71:22: F821 undefined name 'DummyIter'\r\n        data_train = DummyIter(data_train)\r\n                     ^\r\n\r\n./example/rnn/old/lstm_bucketing.py:72:20: F821 undefined name 'DummyIter'\r\n        data_val = DummyIter(data_val)\r\n                   ^\r\n\r\n./example/speech-demo/decode_mxnet.py:157:87: F821 undefined name 'data_train'\r\n                    posteriors = np.log(posteriors[:label[0][0],1:] + 1e-20) - np.log(data_train.label_mean).T\r\n                                                                                      ^\r\n\r\n./example/speech-demo/io_func/convert2kaldi.py:71:48: F821 undefined name 'pool_size'\r\n            output_size = int(layers[i + 1]) * pool_size\r\n                                               ^\r\n\r\n./example/speech-demo/io_func/utils.py:99:12: F821 undefined name 'T'\r\n    return T.minimum(x * (x > 0), 6)\r\n           ^\r\n\r\n./example/speech-demo/io_func/utils.py:107:16: F821 undefined name 'T'\r\n        return T.nnet.sigmoid\r\n               ^\r\n\r\n./example/speech-demo/io_func/utils.py:109:16: F821 undefined name 'T'\r\n        return T.tanh\r\n               ^\r\n\r\n./example/speech-demo/io_func/utils.py:116:12: F821 undefined name 'T'\r\n    return T.nnet.sigmoid\r\n           ^\r\n\r\n./example/speech-demo/io_func/utils.py:119:20: F821 undefined name 'T'\r\n    if act_func == T.nnet.sigmoid:\r\n                   ^\r\n\r\n./example/speech-demo/io_func/utils.py:121:20: F821 undefined name 'T'\r\n    if act_func == T.tanh:\r\n                   ^\r\n\r\n./example/speech-demo/io_func/utils.py:166:10: F821 undefined name 'T'\r\n    cs = T.add_no_assoc(carry, inc)\r\n         ^\r\n\r\n./example/speech-demo/io_func/utils.py:167:9: F821 undefined name 'T'\r\n    s = T.add_no_assoc(total, cs)\r\n        ^\r\n\r\n./example/speech-demo/io_func/utils.py:168:20: F821 undefined name 'T'\r\n    update_carry = T.sub(cs, T.sub(s, total))\r\n                   ^\r\n\r\n./example/speech-demo/io_func/utils.py:168:30: F821 undefined name 'T'\r\n    update_carry = T.sub(cs, T.sub(s, total))\r\n                             ^\r\n\r\n./example/ssd/dataset/pycocotools/coco.py:283:41: F821 undefined name 'm'\r\n                        img = np.ones( (m.shape[0], m.shape[1], 3) )\r\n                                        ^\r\n\r\n./example/ssd/dataset/pycocotools/coco.py:283:53: F821 undefined name 'm'\r\n                        img = np.ones( (m.shape[0], m.shape[1], 3) )\r\n                                                    ^\r\n\r\n./example/ssd/dataset/pycocotools/coco.py:290:52: F821 undefined name 'm'\r\n                        ax.imshow(np.dstack( (img, m*0.5) ))\r\n                                                   ^\r\n\r\n./example/ssd/dataset/pycocotools/coco.py:452:16: F821 undefined name 'm'\r\n        return m\r\n               ^\r\n\r\n./example/ssd/symbol/common.py:209:23: F821 undefined name 'start_offset'\r\n         min_sizes = [start_offset] + tmp.tolist()\r\n                      ^\r\n\r\n./example/ssd/symbol/common.py:210:46: F821 undefined name 'start_offset'\r\n         max_sizes = tmp.tolist() + [tmp[-1]+start_offset]\r\n                                             ^\r\n\r\n./python/mxnet/initializer.py:698:20: F821 undefined name '_INITIALIZER_REGISTRY'\r\n            init = _INITIALIZER_REGISTRY[klass.lower()](**kwargs)\r\n                   ^\r\n\r\n./tests/python/gpu/test_operator_gpu.py:41:5: F821 undefined name 'test_support_vector_machine_l1_svm'\r\ndel test_support_vector_machine_l1_svm\r\n    ^\r\n\r\n./tests/python/gpu/test_operator_gpu.py:42:5: F821 undefined name 'test_support_vector_machine_l2_svm'\r\ndel test_support_vector_machine_l2_svm\r\n    ^\r\n\r\n./tools/caffe_converter/convert_symbol.py:317:11: F821 undefined name 'mx'\r\n    ret = mx.sym.Group(ret)\r\n          ^\r\n\r\n43    F821 undefined name 'root_path'\r\n```"}}
{"actor":{"display_login":"sandeep-krishnamurthy"}}