From 4b9bae81d68dc6ea69983c5863827c561b74423e Mon Sep 17 00:00:00 2001 From: "Etienne.bfx" Date: Tue, 16 Apr 2024 21:43:44 +0200 Subject: [PATCH] Update engine.py to avoid torch warning (#5408) The state_dict function of module.py from torch write a warning if arguments are positional arguments and not keyword arguments --------- Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> Co-authored-by: ebonnafoux --- deepspeed/runtime/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepspeed/runtime/engine.py b/deepspeed/runtime/engine.py index 992d7877c179..9a2b943b0992 100644 --- a/deepspeed/runtime/engine.py +++ b/deepspeed/runtime/engine.py @@ -2542,7 +2542,7 @@ def all_gather_scalar(self, value, dp_group): return tensor_list def module_state_dict(self, destination=None, prefix="", keep_vars=False, exclude_frozen_parameters=False): - sd = self.module.state_dict(destination, prefix, keep_vars) + sd = self.module.state_dict(destination=destination, prefix=prefix, keep_vars=keep_vars) # Remove frozen parameter weights from state_dict if specified if exclude_frozen_parameters: