deepspeedai / deepspeedai/DeepSpeedExamples

TypeError: DeepSpeedZeroOptimizer.check_overflow() got an unexpected keyword argument 'external'

Open
#673 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
6.8k
Forks
1.1k
Avg merge
2d 16h
Merged PRs (30d)
1

Description

I tried to enable the '--align_overflow' option during step3 training (with zero stage 2), which was updated in PR #624 . However, I encountered the following error during gradient updates:

File "/mapping-data/rlhf_training/step3_rlhf_finetuning/ppo_trainer.py", line 322, in train_rlhf

actor_overflow = self.actor_model.optimizer.check_overflow(

TypeError: DeepSpeedZeroOptimizer.check_overflow() got an unexpected keyword argument 'external'

I checked the recent versions of [deepspeed/runtime/zero/stage_1_and_2.py] (https://github.com/microsoft/DeepSpeed/blob/v0.10.0/deepspeed/runtime/zero/stage_1_and_2.py#L1904) and did not find the 'external' parameter except for 'partition_gradients'. I am wandering which version of deepspeed I need to use to apply this option?

Also, I noticed that the aforementioned function does not have a return value and I have to modify the code to: 'actor_overflow = self.actor_model.optimizer.overflow' to get actor_overflow value.

If I could get some help, I would be very grateful.

Contributor guide

No contributing guide indexed for this repository

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 at rlhf_training/step3_rlhf_finetuning/ppo_trainer.py around line 322 and compare the check_overflow call with deepspeed/runtime/zero/stage_1_and_2.py in v0.10.0. Reproduce step3 training with --align_overflow and verify which supported DeepSpeed version or API makes the call work and provides the actor overflow value without a TypeError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.