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
f73c2097
Unverified
Commit
f73c2097
authored
Aug 30, 2023
by
Yih-Dar
Committed by
GitHub
Aug 30, 2023
Browse files
Fix imports (#25869)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
ed290b08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/transformers/integrations/integration_utils.py
src/transformers/integrations/integration_utils.py
+3
-3
No files found.
src/transformers/integrations/integration_utils.py
View file @
f73c2097
...
...
@@ -255,7 +255,7 @@ def run_hp_search_ray(trainer, n_trials: int, direction: str, **kwargs) -> BestR
ray
.
tune
.
report
(
objective
=
local_trainer
.
objective
,
**
metrics
,
done
=
True
)
if
not
trainer
.
_memory_tracker
.
skip_memory_metrics
:
from
.trainer_utils
import
TrainerMemoryTracker
from
.
.trainer_utils
import
TrainerMemoryTracker
logger
.
warning
(
"Memory tracking for your Trainer is currently "
...
...
@@ -463,7 +463,7 @@ def run_hp_search_sigopt(trainer, n_trials: int, direction: str, **kwargs) -> Be
def
run_hp_search_wandb
(
trainer
,
n_trials
:
int
,
direction
:
str
,
**
kwargs
)
->
BestRun
:
from
.integrations
import
is_wandb_available
from
.
.integrations
import
is_wandb_available
if
not
is_wandb_available
():
raise
ImportError
(
"This function needs wandb installed: `pip install wandb`"
)
...
...
@@ -763,7 +763,7 @@ class WandbCallback(TrainerCallback):
if
self
.
_wandb
is
None
:
return
if
self
.
_log_model
in
(
"end"
,
"checkpoint"
)
and
self
.
_initialized
and
state
.
is_world_process_zero
:
from
.trainer
import
Trainer
from
.
.trainer
import
Trainer
fake_trainer
=
Trainer
(
args
=
args
,
model
=
model
,
tokenizer
=
tokenizer
)
with
tempfile
.
TemporaryDirectory
()
as
temp_dir
:
...
...
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