OpenBMB / OpenBMB/BMCook

TypeErrorTypeError: : AdamOptimizer.__init__() got an unexpected keyword argument 'scale'AdamOptimizer.__init__() got an unexpected keywo$ d argument 'scale'

Open
#21 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
172
Forks
26
PR merge metrics
No merged PRs in 30d

Description

When I try to run the examples :bash gpt/gpt2_test.sh
It fails and throws out the following errors:

File "/workspace/BMCook/examples/gpt/gpt2_test.py", line 84, in main
File "/workspace/BMCook/examples/gpt/gpt2_test.py", line 84, in main
optimizer = bmt.optim.AdamOptimizer(model.parameters(), scale=2**20)optimizer = bmt.optim.AdamOptimizer(model.parameters(), scale=2**20)
TypeErrorTypeError: : AdamOptimizer.init() got an unexpected keyword argument 'scale'AdamOptimizer.init() got an unexpected keyword argument 'scale'

The bmtrain version I use is v0.2.1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running bash gpt/gpt2_test.sh with bmtrain v0.2.1 and inspect examples/gpt/gpt2_test.py at line 84. Compare the AdamOptimizer API used there with the installed version. Done means the example no longer fails with the unexpected scale keyword error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.