Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
7727fa4c
Commit
7727fa4c
authored
Oct 27, 2022
by
Tom Aarsen
Browse files
Remove f-prefix from strings that don't use formatting
parent
54bd6ed1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
bitsandbytes/optim/lars.py
bitsandbytes/optim/lars.py
+3
-3
bitsandbytes/optim/optimizer.py
bitsandbytes/optim/optimizer.py
+2
-2
bitsandbytes/optim/rmsprop.py
bitsandbytes/optim/rmsprop.py
+6
-6
bitsandbytes/optim/sgd.py
bitsandbytes/optim/sgd.py
+3
-3
No files found.
bitsandbytes/optim/lars.py
View file @
7727fa4c
...
...
@@ -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"
,
...
...
bitsandbytes/optim/optimizer.py
View file @
7727fa4c
...
...
@@ -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"
)
...
...
bitsandbytes/optim/rmsprop.py
View file @
7727fa4c
...
...
@@ -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
,
...
...
bitsandbytes/optim/sgd.py
View file @
7727fa4c
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment