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

Incorrect accelerator device handling for MPS in TrainingArguments #31811

Closed
3 of 4 tasks
andstor opened this issue Jul 5, 2024 · 0 comments · Fixed by #31812
Closed
3 of 4 tasks

Incorrect accelerator device handling for MPS in TrainingArguments #31811

andstor opened this issue Jul 5, 2024 · 0 comments · Fixed by #31812

Comments

@andstor
Copy link
Contributor

andstor commented Jul 5, 2024

System Info

  • transformers version: 4.43.0.dev0
  • Platform: macOS-14.4.1-arm64-arm-64bit
  • Python version: 3.9.13
  • Huggingface_hub version: 0.23.4
  • Safetensors version: 0.4.3
  • Accelerate version: 0.31.0
  • Accelerate config: - compute_environment: LOCAL_MACHINE
    - distributed_type: NO
    - mixed_precision: no
    - use_cpu: False
    - debug: False
    - num_processes: 1
    - machine_rank: 0
    - num_machines: 1
    - rdzv_backend: static
    - same_network: True
    - main_training_function: main
    - enable_cpu_affinity: False
    - downcast_bf16: no
    - tpu_use_cluster: False
    - tpu_use_sudo: False
    - tpu_env: []
  • PyTorch version (GPU?): 2.3.1 (False)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using distributed or parallel set-up in script?:

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

Execute the following code using accelerate with MPS accelerator.

from transformers import TrainingArguments

training_args = TrainingArguments(output_dir = "tmp_trainer")
print(training_args.device)

Expected behavior

I expect to see mps will be displayed. However, I see cpu.

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

Successfully merging a pull request may close this issue.

1 participant