DeepSpeed
DeepSpeed copied to clipboard
With v0.9.0 I cannot instantiate DeepSpeed. I get the error "AttributeError: 'NoneType' object has no attribute 'optimizer_name'"
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.
With the release of 0.9.0, we slightly changed the params for DeepSpeedEngine
initialization: https://github.com/microsoft/DeepSpeed/blob/4de4d2acc6077707c806a8abbc26fba1e2779745/deepspeed/init.py#L142
Specifically, we moved the creation of the DeepSpeedConfig
outside of engine and expect that to be passed in as config_class
. Could you please share more about your use case? Typically users will interact with DeepSpeed via deepspeed.initialize
. Knowing more about how you are initializing DeepSpeed will help us avoid breaking changes in the future.
I'm facing the same "optimzer_name" error.
me aswell. Has anyone solved this