Accelerate on 1 GPU


I wanted to use Accelerate on 1 GPU. I answered the questions as below:

(env) niels:~/python_projects/community-events-1$ accelerate config
In which compute environment are you running? ([0] This machine, [1] AWS (Amazon SageMaker)): 0
Which type of machine are you using? ([0] No distributed training, [1] multi-CPU, [2] multi-GPU, [3] TPU): 0
Do you want to run your training on CPU only (even if a GPU is available)? [no]:no
Do you want to use DeepSpeed? [yes/NO]: no
How many processes in total will you use? [1]: 1
Do you wish to use FP16 or BF16 (mixed precision)? [NO/fp16/bf16]: no

But when printing the environment, use_cpu is set to True:

(env) niels@brutasse:~/python_projects/community-events-1$ accelerate env

Copy-and-paste the text below in your GitHub issue

- `Accelerate` version: 0.6.1
- Platform: Linux-5.3.0-64-generic-x86_64-with-glibc2.30
- Python version: 3.9.10
- Numpy version: 1.22.3
- PyTorch version (GPU?): 1.11.0+cu102 (True)
- `Accelerate` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: NO
        - mixed_precision: no
        - use_cpu: True
        - num_processes: 1
        - machine_rank: 0
        - num_machines: 1
        - main_process_ip: None
        - main_process_port: None
        - main_training_function: main
        - deepspeed_config: {}

To reproduce my error, I am running the following script (that uses Accelerate): community-events/huggan/pytorch/lightweight_gan at main 路 huggingface/community-events 路 GitHub.


Should be fixed once this PR is merged: bug by muellerzr 路 Pull Request #311 路 huggingface/accelerate 路 GitHub