Skip to content

Commit

Permalink
Fix accelerate logger bug (huggingface#23650)
Browse files Browse the repository at this point in the history
* fix logger bug

* Update tests/mixed_int8/test_mixed_int8.py

Co-authored-by: Zachary Mueller <[email protected]>

* import `PartialState`

---------

Co-authored-by: Zachary Mueller <[email protected]>
  • Loading branch information
2 people authored and sheonhan committed Jun 1, 2023
1 parent fd821a3 commit 5d7ab26
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/mixed_int8/test_mixed_int8.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
pipeline,
)
from transformers.testing_utils import (
is_accelerate_available,
is_torch_available,
require_accelerate,
require_bitsandbytes,
Expand All @@ -40,6 +41,13 @@
from transformers.utils.versions import importlib_metadata


if is_accelerate_available():
from accelerate import PartialState
from accelerate.logging import get_logger

logger = get_logger(__name__)
_ = PartialState()

if is_torch_available():
import torch
import torch.nn as nn
Expand Down

0 comments on commit 5d7ab26

Please sign in to comment.