deepspeedai / deepspeedai/DeepSpeed

With v0.9.0 I cannot instantiate DeepSpeed. I get the error "AttributeError: 'NoneType' object has no attribute 'optimizer_name'"

Open
#3,309 3 comments 0 reactions 1 assignee View on GitHub

@mrwyattii is already working on this.

Since May 15, 2023.

bug training
Dominant language
Python
Stars
43.1k
Forks
5k
Avg merge
4d 15h
Merged PRs (30d)
112

Description

Describe the bug
With v0.9.0 I cannot instantiate DeepSpeed. I get the error "AttributeError: 'NoneType' object has no attribute 'optimizer_name'"

To Reproduce
Here is the code that used to work when istantiating DeepSpeed:

class Engine(DeepSpeedEngine):
def init(self, *args, **kwargs):
...
...
super().init(None, *args, **kwargs)
...
...

Expected behavior
A usable DeepSpeed instance will be created.

Actual result*
I get the following error traceback:
....
....
File "/usr/local/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 264, in init
self._do_sanity_check()
File "/usr/local/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 988, in _do_sanity_check
if self.optimizer_name() is not None:
File "/usr/local/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 648, in optimizer_name
return (self.client_optimizer.class.name if self.client_optimizer else self._config.optimizer_name)
AttributeError: 'NoneType' object has no attribute 'optimizer_name'

It seems that cfg is now mandatory during insanitation. It wasn't mandatory before.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.