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
chenpangpang
transformers
Commits
5b67ab99
Unverified
Commit
5b67ab99
authored
Feb 07, 2023
by
Sylvain Gugger
Committed by
GitHub
Feb 07, 2023
Browse files
Fix import in Accelerate for find_exec_bs (#21501)
parent
eb1771ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/trainer_utils.py
src/transformers/trainer_utils.py
+2
-2
No files found.
src/transformers/trainer_utils.py
View file @
5b67ab99
...
@@ -646,9 +646,9 @@ def find_executable_batch_size(
...
@@ -646,9 +646,9 @@ def find_executable_batch_size(
if
auto_find_batch_size
:
if
auto_find_batch_size
:
requires_backends
(
find_executable_batch_size
,
"accelerate"
)
requires_backends
(
find_executable_batch_size
,
"accelerate"
)
import
accelerate.
memory_utils
as
mem_utils
from
accelerate.
utils
import
find_executable_batch_size
as
accelerate_find_executable_batch_size
return
mem_utils
.
find_executable_batch_size
(
function
=
function
,
starting_batch_size
=
starting_batch_size
)
return
accelerate_
find_executable_batch_size
(
function
=
function
,
starting_batch_size
=
starting_batch_size
)
return
functools
.
partial
(
function
,
batch_size
=
starting_batch_size
)
return
functools
.
partial
(
function
,
batch_size
=
starting_batch_size
)
...
...
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