Is there an existing issue for this?
Current Behavior
kaggle 默认环境下执行官方示例代码
错误信息:
ImportError: cannot import name 'convert_file_size_to_int' from 'transformers.utils.hub' (/opt/conda/lib/python3.7/site-packages/transformers/utils/hub.py)
Expected Behavior
No response
Steps To Reproduce
env:
- pip install protobuf==3.20.0 transformers==4.26.1 icetk cpm_kernels
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).half().cuda()
response, history = model.chat(tokenizer, "你好", history=[])
print(response)
response, history = model.chat(tokenizer, "晚上睡不着应该怎么办", history=history)
print(response)
Environment
- OS:
- Python: 3.7.12
- Transformers: 4.26.1
- PyTorch: 1.11.0
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) : true
Anything else?
No response
Is there an existing issue for this?
Current Behavior
kaggle 默认环境下执行官方示例代码
错误信息:
Expected Behavior
No response
Steps To Reproduce
env:
Environment
Anything else?
No response