From 5202df769fd2447f9468ece585603408de2f3c7a Mon Sep 17 00:00:00 2001 From: Huan Zhao Date: Fri, 1 Nov 2024 17:03:49 +0800 Subject: [PATCH] Fix unexpected keyword error when deepspeed is not available Signed-off-by: Huan Zhao --- .../torch/src/python/aimet_torch/v2/deepspeed_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TrainingExtensions/torch/src/python/aimet_torch/v2/deepspeed_utils.py b/TrainingExtensions/torch/src/python/aimet_torch/v2/deepspeed_utils.py index 91eb1d4ef3d..33af3ed9090 100644 --- a/TrainingExtensions/torch/src/python/aimet_torch/v2/deepspeed_utils.py +++ b/TrainingExtensions/torch/src/python/aimet_torch/v2/deepspeed_utils.py @@ -90,7 +90,8 @@ def _do_patch_dummy_parameters(module): except ImportError: class SafeGatheredParameters(contextlib.nullcontext): """ Dummy placeholder in case deepspeed doesn't exist """ - pass + def __init__(self, *args, **kwargs): + super().__init__() def _do_patch_dummy_parameters(module): # pylint: disable=unused-argument