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

[v2.0] Add Optim Warning #20426

Merged
merged 3 commits into from
Jul 26, 2021
Merged

[v2.0] Add Optim Warning #20426

merged 3 commits into from
Jul 26, 2021

Conversation

barry-jin
Copy link
Contributor

Description

Optimizers in MXNet2.0 are refactored and some have new keyword name for the parameters, like adagrad(eps->epsilon), rmsprop(gamma1->rho, gamma2->momentum). It will be confusing for users who migrate from v1.x to find that using rmsprop could raise the following error:

Traceback (most recent call last):
  File "optimizer_update.py", line 16, in <module>
    rmsprop_optimizer = optimizer.RMSProp(learning_rate=0.001, gamma1=0.9, gamma2=0.9, epsilon=1e-07, centered=False)
  File "/home/ubuntu/workspace/incubator-mxnet/python/mxnet/optimizer/rmsprop.py", line 73, in __init__
    super(RMSProp, self).__init__(learning_rate=learning_rate,
  File "/home/ubuntu/workspace/incubator-mxnet/python/mxnet/optimizer/optimizer.py", line 96, in __init__
    super(Optimizer, self).__init__(**kwargs)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

This PR will add warnings for deprecated parameters in the following optimizers:

  1. adagrad:
    • eps -> epsilon
  2. rmsprop:
    • gamma1 -> rho
    • gamma2 -> momentum

Checklist

Essentials

  • PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@mxnet-bot
Copy link

Hey @barry-jin , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [clang, centos-gpu, website, centos-cpu, miscellaneous, unix-gpu, sanity, unix-cpu, edge, windows-cpu, windows-gpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 8, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 8, 2021
@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-awaiting-review PR is waiting for code review pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 12, 2021
@barry-jin
Copy link
Contributor Author

@mxnet-bot run ci [centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-work-in-progress PR is still work in progress and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 15, 2021
@barry-jin
Copy link
Contributor Author

@mxnet-bot run ci [centos-gpu]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [centos-gpu]

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-work-in-progress PR is still work in progress pr-awaiting-testing PR is reviewed and waiting CI build and test labels Jul 20, 2021
@szha szha merged commit 244a81b into apache:master Jul 26, 2021
sakibguy added a commit to sakibguy/incubator-mxnet that referenced this pull request Jul 28, 2021
@barry-jin barry-jin deleted the add-optim-warning branch August 4, 2021 21:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants