My environment is
Windows11
transformers 4.42.3
torch 2.3.0+cu121
deepspeed 0.14.5+unknow
Who can help? / 谁可以帮助到您?
No response
Information / 问题信息
[X] The official example scripts / 官方的示例脚本
[ ] My own modified scripts / 我自己修改的脚本和任务
Reproduction / 复现过程
when I run
evaluate_cogagent_demo.py
I encountered the following error message
2024-07-27 16:07:37,915] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
D:\conda3\envs\pytorch\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead.
warnings.warn(
[2024-07-27 16:07:40,151] [INFO] DeepSpeed/CUDA is not installed, fallback to Pytorch checkpointing.
Traceback (most recent call last):
File "D:\PycharmProjects\CogVLM-main\finetune_demo\evaluate_cogagent_demo.py", line 7, in
from sat import mpu, get_args, get_tokenizer
File "D:\conda3\envs\pytorch\lib\site-packages\satinit.py", line 6, in
from .training.deepspeed_training import training_main
File "D:\conda3\envs\pytorch\lib\site-packages\sat\training\deepspeed_training.py", line 27, in
import deepspeed
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeedinit.py", line 25, in
from . import ops
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\opsinit.py", line 11, in
from . import transformer
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformerinit.py", line 8, in
from ...model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py", line 17, in
from deepspeed.ops.transformer.inference.triton.mlp import TritonMLP
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformer\inferenceinit.py", line 7, in
from ....model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference
ImportError: cannot import name 'DeepSpeedTransformerInference' from partially initialized module 'deepspeed.model_implementations.transformers.ds_transformer' (most likely due to a circular import) (D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py)
2024-07-27 16:07:37,915] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
D:\conda3\envs\pytorch\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead.
warnings.warn(
[2024-07-27 16:07:40,151] [INFO] DeepSpeed/CUDA is not installed, fallback to Pytorch checkpointing.
Traceback (most recent call last):
File "D:\PycharmProjects\CogVLM-main\finetune_demo\evaluate_cogagent_demo.py", line 7, in
from sat import mpu, get_args, get_tokenizer
File "D:\conda3\envs\pytorch\lib\site-packages\satinit.py", line 6, in
from .training.deepspeed_training import training_main
File "D:\conda3\envs\pytorch\lib\site-packages\sat\training\deepspeed_training.py", line 27, in
import deepspeed
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeedinit.py", line 25, in
from . import ops
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\opsinit.py", line 11, in
from . import transformer
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformerinit.py", line 8, in
from ...model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py", line 17, in
from deepspeed.ops.transformer.inference.triton.mlp import TritonMLP
File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformer\inferenceinit.py", line 7, in
from ....model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference
ImportError: cannot import name 'DeepSpeedTransformerInference' from partially initialized module 'deepspeed.model_implementations.transformers.ds_transformer' (most likely due to a circular import) (D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py)
Process finished with exit code 1
I can't find the solution. Any suggestions ?
Thank you for your help.
System Info / 系統信息
My environment is Windows11 transformers 4.42.3 torch 2.3.0+cu121 deepspeed 0.14.5+unknow
Who can help? / 谁可以帮助到您?
No response
Information / 问题信息
Reproduction / 复现过程
when I run
evaluate_cogagent_demo.py
I encountered the following error message
2024-07-27 16:07:37,915] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect) D:\conda3\envs\pytorch\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead. warnings.warn( [2024-07-27 16:07:40,151] [INFO] DeepSpeed/CUDA is not installed, fallback to Pytorch checkpointing. Traceback (most recent call last): File "D:\PycharmProjects\CogVLM-main\finetune_demo\evaluate_cogagent_demo.py", line 7, in from sat import mpu, get_args, get_tokenizer File "D:\conda3\envs\pytorch\lib\site-packages\satinit.py", line 6, in from .training.deepspeed_training import training_main File "D:\conda3\envs\pytorch\lib\site-packages\sat\training\deepspeed_training.py", line 27, in import deepspeed File "D:\conda3\envs\pytorch\lib\site-packages\deepspeedinit.py", line 25, in from . import ops File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\opsinit.py", line 11, in from . import transformer File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformerinit.py", line 8, in from ...model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py", line 17, in from deepspeed.ops.transformer.inference.triton.mlp import TritonMLP File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformer\inferenceinit.py", line 7, in from ....model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference ImportError: cannot import name 'DeepSpeedTransformerInference' from partially initialized module 'deepspeed.model_implementations.transformers.ds_transformer' (most likely due to a circular import) (D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py)
Process finished with exit code 1
Expected behavior / 期待表现
My environment is
transformers 4.42.3 torch 2.3.0+cu121 deepspeed 0.14.5+unknow
when I run
evaluate_cogagent_demo.py
I encountered the following error message
2024-07-27 16:07:37,915] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect) D:\conda3\envs\pytorch\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using TRANSFORMERS_CACHE is deprecated and will be removed in v5 of Transformers. Use HF_HOME instead. warnings.warn( [2024-07-27 16:07:40,151] [INFO] DeepSpeed/CUDA is not installed, fallback to Pytorch checkpointing. Traceback (most recent call last): File "D:\PycharmProjects\CogVLM-main\finetune_demo\evaluate_cogagent_demo.py", line 7, in from sat import mpu, get_args, get_tokenizer File "D:\conda3\envs\pytorch\lib\site-packages\satinit.py", line 6, in from .training.deepspeed_training import training_main File "D:\conda3\envs\pytorch\lib\site-packages\sat\training\deepspeed_training.py", line 27, in import deepspeed File "D:\conda3\envs\pytorch\lib\site-packages\deepspeedinit.py", line 25, in from . import ops File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\opsinit.py", line 11, in from . import transformer File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformerinit.py", line 8, in from ...model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py", line 17, in from deepspeed.ops.transformer.inference.triton.mlp import TritonMLP File "D:\conda3\envs\pytorch\lib\site-packages\deepspeed\ops\transformer\inferenceinit.py", line 7, in from ....model_implementations.transformers.ds_transformer import DeepSpeedTransformerInference ImportError: cannot import name 'DeepSpeedTransformerInference' from partially initialized module 'deepspeed.model_implementations.transformers.ds_transformer' (most likely due to a circular import) (D:\conda3\envs\pytorch\lib\site-packages\deepspeed\model_implementations\transformers\ds_transformer.py)
Process finished with exit code 1
I can't find the solution. Any suggestions ? Thank you for your help.