@@ -488,10 +488,10 @@ def build_train_args(self, batch: Any, batch_idx: int, opt_idx: int, hiddens: Te
488488 if len (self .trainer .optimizers ) > 1 :
489489 if self .trainer .has_arg ("training_step" , "optimizer_idx" ):
490490 if not self .trainer .lightning_module .automatic_optimization :
491- self .warning_cache .warn (
491+ self .warning_cache .deprecation (
492492 "`training_step` hook signature has changed in v1.3."
493493 " `optimizer_idx` argument has been removed in case of manual optimization. Support for"
494- " the old signature will be removed in v1.5" , DeprecationWarning
494+ " the old signature will be removed in v1.5" ,
495495 )
496496 args .append (opt_idx )
497497 elif not self .trainer .has_arg (
@@ -682,10 +682,10 @@ def _build_kwargs(self, batch: Any, batch_idx: int, opt_idx: int, hiddens: Optio
682682 has_opt_idx_in_train_step = is_param_in_hook_signature (training_step_fx , "optimizer_idx" )
683683 if has_opt_idx_in_train_step :
684684 if not lightning_module .automatic_optimization :
685- self .warning_cache .warn (
685+ self .warning_cache .deprecation (
686686 "`training_step` hook signature has changed in v1.3."
687687 " `optimizer_idx` argument has been removed in case of manual optimization. Support for"
688- " the old signature will be removed in v1.5" , DeprecationWarning
688+ " the old signature will be removed in v1.5" ,
689689 )
690690 step_kwargs ['optimizer_idx' ] = opt_idx
691691 elif not has_opt_idx_in_train_step and lightning_module .automatic_optimization :
0 commit comments