Skip to content

Commit

Permalink
Replace deprecated transformers.deepspeed module (#872)
Browse files Browse the repository at this point in the history
venv/lib/python3.10/site-packages/transformers/deepspeed.py:23:
FutureWarning: transformers.deepspeed module is deprecated and
will be removed in a future version. Please import deepspeed
modules directly from transformers.integrations
  warnings.warn(

Signed-off-by: Songlin Jiang <[email protected]>
Co-authored-by: Logan Adams <[email protected]>
  • Loading branch information
HollowMan6 and loadams authored Oct 29, 2024
1 parent 5a61193 commit cab3361
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
AutoModel,
)
from huggingface_hub import snapshot_download
from transformers.deepspeed import HfDeepSpeedConfig
from transformers.integrations.deepspeed import HfDeepSpeedConfig

from dschat.utils.model.reward_model import RewardModel
from dschat.utils.utils import load_state_dict_into_model, print_rank_0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
import data.DST as DST # default special tokens
from torch.utils.data import DataLoader
from transformers.deepspeed import HfDeepSpeedConfig
from transformers.integrations.deepspeed import HfDeepSpeedConfig
import numpy as np
from .vis_proj import VisProjection_vit, VisProjection_perceiver

Expand Down
2 changes: 1 addition & 1 deletion inference/huggingface/zero_inference/run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from transformers import (AutoConfig, AutoTokenizer, AutoModelForCausalLM,
BloomForCausalLM, OPTForCausalLM, LlamaForCausalLM,
)
from transformers.deepspeed import HfDeepSpeedConfig
from transformers.integrations.deepspeed import HfDeepSpeedConfig
from utils import (GB, add_model_hooks, cache_bytes,
get_filename, get_quant_config, hidden_bytes, meta_to_cpu,
model_bytes, write_benchmark_log)
Expand Down

0 comments on commit cab3361

Please sign in to comment.