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

Fix some Bugs of Undefined Variable #33488

Merged
merged 2 commits into from
Jun 11, 2021
Merged

Fix some Bugs of Undefined Variable #33488

merged 2 commits into from
Jun 11, 2021

Conversation

Jiangxinz
Copy link
Contributor

PR types

Bug fixes

PR changes

Others

Describe

  1. python/paddle/tests/test_model.py:
    Line129: undefine variable name self,
    use 'cls' instead of 'self'.
  2. python/paddle/fluid/tests/unittests/xpu/test_pool2d_op_xpu.py:
    Line 57, 59, 97, 99, 203, 211: undefine variable name adaptive_start_index,
    Line 58, 60, 98, 100, 204, 212: undefine variable name adaptive_end_index,
    from test_pool2d_op import adaptive_start_index, adaptive_end_index
  3. python/paddle/fluid/optimizer.py:
    Line 1472: Undefined variable 'value',
    use 'num_trainers' instead of 'value'.
    Line 1926: Undefined variable 'warnings',
    import warnings
    Line 5687: Undefined variable 'fluid'
    import paddle.fluid as fluid
  4. python/paddle/optimizer/optimizer.py
    Line 313: Undefined variable 'item'
    use 'model_np' instead of 'item'.
    Line 317: Undefined variable 'item'
    use 'model_np' instead of 'item'.
  5. python/paddle/distributed/utils.py
    Line 387: Undefined variable 'distutils'
    from distutils.util import strtobool
  6. python/paddle/fluid/tests/unittests/test_eager_deletion_delete_vars.py
    Line 178: Undefined variable 'persistables'
    use 'persistables' instead of 'persitables' in line 148
  7. python/paddle/text/datasets/wmt14.py
    Line 194, 195: Undefined variable 'six'
    import six
  8. python/paddle/fluid/tests/unittests/mkldnn/test_conv2d_transpose_mkldnn_op.py
    Line 158: Undefined variable 'enable_static'
    from paddle import enable_static
  9. python/paddle/optimizer/lr.py
    Line 1352: Undefined variable 'loss'
    use 'metrics' instead of 'loss'
  10. python/paddle/fluid/dataloader/collate.py
    Line 81: Undefined variable 'outputs'
    remove return outputs

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@Jiangxinz Jiangxinz changed the title Fix some bugs of Undefined variable Fix some Bugs of Undefined Variable Jun 10, 2021
Copy link
Contributor

@lelelelelez lelelelelez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lelelelelez lelelelelez merged commit b2afc8d into PaddlePaddle:develop Jun 11, 2021
@Jiangxinz Jiangxinz deleted the fix-undef-var branch June 11, 2021 05:58
lelelelelez pushed a commit that referenced this pull request Jun 15, 2021
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

Successfully merging this pull request may close these issues.

2 participants