deepspeedai / deepspeedai/DeepSpeed
With v0.9.0 I cannot instantiate DeepSpeed. I get the error "AttributeError: 'NoneType' object has no attribute 'optimizer_name'"
@mrwyattii is already working on this.
Since May 15, 2023.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.