accelerate icon indicating copy to clipboard operation
accelerate copied to clipboard

Cannot import

Open xia0nan opened this issue 2 years ago • 1 comments

System Info

accelerate==0.19.0

OS:
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Python 3.8.10

torch==2.0.1

container:
nvcr.io/nvidia/pytorch:23.04-py3

Information

  • [X] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
  • [ ] My own task or dataset (give details below)

Reproduction

I cannot import accelerate

Command: from accelerate import Accelerator

Error:

ImportError: /usr/local/lib/python3.8/dist-packages/transformer_engine_extensions.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

Container image: nvcr.io/nvidia/pytorch:23.04-py3

Error showed up when I updated the xformer: pip install xformers

It downgraded my torch from 2.1.0 to 2.0.1:

Successfully uninstalled torch-2.1.0a0+fe05266

Successfully installed mypy-extensions-1.0.0 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-cupti-cu11-11.7.101 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 nvidia-cufft-cu11-10.9.0.58 nvidia-curand-cu11-10.2.10.91 nvidia-cusolver-cu11-11.4.0.1 nvidia-cusparse-cu11-11.7.4.91 nvidia-nccl-cu11-2.14.3 nvidia-nvtx-cu11-11.7.91 pyre-extensions-0.0.29 torch-2.0.1 typing-inspect-0.9.0 xformers-0.0.20

Expected behavior

Successfully import the library: input: from accelerate import Accelerator

output: none

xia0nan avatar Jun 01 '23 08:06 xia0nan

That's a problem between PyTorch and xformer. You should report the issue on their repos :-)

sgugger avatar Jun 01 '23 13:06 sgugger

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Jul 01 '23 15:07 github-actions[bot]