From 7727fa4c8c6c1ef2b109120aff4196a0a6bf3ed6 Mon Sep 17 00:00:00 2001 From: Tom Aarsen Date: Thu, 27 Oct 2022 13:36:39 +0200 Subject: [PATCH] Remove f-prefix from strings that don't use formatting --- bitsandbytes/optim/lars.py | 6 +++--- bitsandbytes/optim/optimizer.py | 4 ++-- bitsandbytes/optim/rmsprop.py | 12 ++++++------ bitsandbytes/optim/sgd.py | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bitsandbytes/optim/lars.py b/bitsandbytes/optim/lars.py index cfaf9c1..73554e3 100644 --- a/bitsandbytes/optim/lars.py +++ b/bitsandbytes/optim/lars.py @@ -25,7 +25,7 @@ class LARS(Optimizer1State): ): if momentum == 0: raise NotImplementedError( - f"LARS without momentum is not supported!" + "LARS without momentum is not supported!" ) super().__init__( "lars", @@ -59,7 +59,7 @@ class LARS8bit(Optimizer1State): ): if momentum == 0: raise NotImplementedError( - f"LARS without momentum is not supported!" + "LARS without momentum is not supported!" ) super().__init__( "lars", @@ -93,7 +93,7 @@ class LARS32bit(Optimizer1State): ): if momentum == 0: raise NotImplementedError( - f"LARS without momentum is not supported!" + "LARS without momentum is not supported!" ) super().__init__( "lars", diff --git a/bitsandbytes/optim/optimizer.py b/bitsandbytes/optim/optimizer.py index ef7443d..b2c59d6 100644 --- a/bitsandbytes/optim/optimizer.py +++ b/bitsandbytes/optim/optimizer.py @@ -282,11 +282,11 @@ class Optimizer8bit(torch.optim.Optimizer): return config def init_state(self, group, p, gindex, pindex): - raise NotImplementedError(f"init_state method needs to be overidden") + raise NotImplementedError("init_state method needs to be overidden") def update_step(self, group, p, gindex, pindex): raise NotImplementedError( - f"The update_step method needs to be overidden" + "The update_step method needs to be overidden" ) diff --git a/bitsandbytes/optim/rmsprop.py b/bitsandbytes/optim/rmsprop.py index dad3cee..2853ca7 100644 --- a/bitsandbytes/optim/rmsprop.py +++ b/bitsandbytes/optim/rmsprop.py @@ -23,10 +23,10 @@ class RMSprop(Optimizer1State): ): if alpha == 0: raise NotImplementedError( - f"RMSprop with alpha==0.0 is not supported!" + "RMSprop with alpha==0.0 is not supported!" ) if centered: - raise NotImplementedError(f"Centered RMSprop is not supported!") + raise NotImplementedError("Centered RMSprop is not supported!") super().__init__( "rmsprop", params, @@ -59,10 +59,10 @@ class RMSprop8bit(Optimizer1State): ): if alpha == 0: raise NotImplementedError( - f"RMSprop with alpha==0.0 is not supported!" + "RMSprop with alpha==0.0 is not supported!" ) if centered: - raise NotImplementedError(f"Centered RMSprop is not supported!") + raise NotImplementedError("Centered RMSprop is not supported!") super().__init__( "rmsprop", params, @@ -96,10 +96,10 @@ class RMSprop32bit(Optimizer1State): if alpha == 0: raise NotImplementedError( - f"RMSprop with alpha==0.0 is not supported!" + "RMSprop with alpha==0.0 is not supported!" ) if centered: - raise NotImplementedError(f"Centered RMSprop is not supported!") + raise NotImplementedError("Centered RMSprop is not supported!") super().__init__( "rmsprop", params, diff --git a/bitsandbytes/optim/sgd.py b/bitsandbytes/optim/sgd.py index a82ce61..3c0fc2b 100644 --- a/bitsandbytes/optim/sgd.py +++ b/bitsandbytes/optim/sgd.py @@ -21,7 +21,7 @@ class SGD(Optimizer1State): block_wise=True, ): if momentum == 0: - raise NotImplementedError(f"SGD without momentum is not supported!") + raise NotImplementedError("SGD without momentum is not supported!") super().__init__( "momentum", params, @@ -52,7 +52,7 @@ class SGD8bit(Optimizer1State): block_wise=True, ): if momentum == 0: - raise NotImplementedError(f"SGD without momentum is not supported!") + raise NotImplementedError("SGD without momentum is not supported!") super().__init__( "momentum", params, @@ -83,7 +83,7 @@ class SGD32bit(Optimizer1State): block_wise=True, ): if momentum == 0: - raise NotImplementedError(f"SGD without momentum is not supported!") + raise NotImplementedError("SGD without momentum is not supported!") super().__init__( "momentum", params,