From 10ffbd93eab191447e707d9044ba154d6ba96a16 Mon Sep 17 00:00:00 2001 From: Iden Kalemaj Date: Thu, 19 Dec 2024 11:34:30 -0800 Subject: [PATCH] Remove **kwargs from optim_class initialization (#702) Summary: None of the optimizer classes accept **kwargs or have special arguments so I am removing **kwargs from optim_class(). Otherwise, the current code throws an error when creating a custom PrivacyEngine that takes in additional arguments. Reviewed By: EnayatUllah Differential Revision: D67456352 --- opacus/privacy_engine.py | 1 - 1 file changed, 1 deletion(-) diff --git a/opacus/privacy_engine.py b/opacus/privacy_engine.py index 558c8f8e..bdddafe4 100644 --- a/opacus/privacy_engine.py +++ b/opacus/privacy_engine.py @@ -136,7 +136,6 @@ def _prepare_optimizer( loss_reduction=loss_reduction, generator=generator, secure_mode=self.secure_mode, - **kwargs, ) def _prepare_data_loader(