Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLU Check Breaks Trainer at Import Time for Older Accelerate Versions #32461

Closed
2 of 4 tasks
alex-jw-brooks opened this issue Aug 6, 2024 · 2 comments
Closed
2 of 4 tasks

Comments

@alex-jw-brooks
Copy link

alex-jw-brooks commented Aug 6, 2024

System Info

  • transformers version: 4.44.0.dev0
  • Platform: Linux-4.15.0-206-generic-x86_64-with-glibc2.27
  • Python version: 3.9.16
  • Huggingface_hub version: 0.24.5
  • Safetensors version: 0.4.4
  • Accelerate version: 0.29.0
  • PyTorch version (GPU?): 2.4.0+cu121 (True)
  • Tensorflow version (GPU?): 2.15.1 (True)
  • Flax version (CPU?/GPU?/TPU?): 0.7.0 (cpu)
  • Jax version: 0.4.13
  • JaxLib version: 0.4.13
  • GPU type: Tesla V100-PCIE-32GB

Who can help?

@muellerzr @SunMarc

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

  • Install the latest version of transformers with accelerate==0.21.0, the current minimum supported version.
  • Try from transformers import trainer

For older versions of Accelerate, this import will throw a runtime error caused by:

ImportError: cannot import name 'is_mlu_available' from 'accelerate.utils' /Users/alexanderjbrooks/transformers/venv/lib/python3.9/site-packages/accelerate/utils/__init__.py)

Expected behavior

We should be able to import the trainer with the minimum supported version of Accelerate! I will submit a PR to this effect.

@SunMarc
Copy link
Member

SunMarc commented Aug 6, 2024

Hey @alex-jw-brooks, thanks for the report ! This should be fixed by this PR #32292 that was created a few days ago. Let us know this this fixes your issue !

@alex-jw-brooks
Copy link
Author

alex-jw-brooks commented Aug 6, 2024

Looks good to me, thanks @SunMarc! I'll close my PR and this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants