support latest deepspeed version for optim (#15682)

### Description
<!-- Describe your changes. -->

support the latest deepspeed 0.9.1 for the next release


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This will avoid the warn message `Skip modifying optimizer because of
unsupported DeepSpeed version`

---------

Co-authored-by: ruiren <ruiren@microsoft.com>
This commit is contained in:
Rui Ren 2023-04-25 20:12:23 -07:00 committed by GitHub
parent 3dc9720cfc
commit db6a9bc033
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,10 +39,10 @@ class DeepSpeedZeROModifier(FP16OptimizerModifier):
# it's safe to update the version supporting list. Otherwise, or the file is moved or renamed,
# we need to check the implementation of these functions in detail.
ds_version = Version(deepspeed.__version__)
if ds_version > Version("0.8.3") or ds_version < Version("0.4.0"):
if ds_version > Version("0.9.1") or ds_version < Version("0.4.0"):
warnings.warn(
"Skip modifying optimizer because of unsupported DeepSpeed version {}, "
"supported version: 0.4.0 - 0.8.3.".format(deepspeed.__version__),
"supported version: 0.4.0 - 0.9.1.".format(deepspeed.__version__),
UserWarning,
)
return False