Skip to content

Error: Invalid value for '--accelerator': 'auto' is not one of 'cpu', 'gpu', 'cuda', 'mps', 'tpu'. #20451

@wkd88

Description

@wkd88

Bug description

when run this codes

fabric run ./path/to/train.py \
    --devices=auto \
    --accelerator=auto

get problem below

Error: Invalid value for '--accelerator': 'auto' is not one of 'cpu', 'gpu', 'cuda', 'mps', 'tpu'.

What version are you seeing the problem on?

v2.4

How to reproduce the bug

No response

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- PyTorch Lightning Version (e.g., 2.4.0):
#- PyTorch Version (e.g., 2.4):
#- Python version (e.g., 3.12):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):

More info

No response

cc @Borda @justusschock @awaelchli

Activity

added
bugSomething isn't working
needs triageWaiting to be triaged by maintainers
on Nov 26, 2024
added
featureIs an improvement or enhancement
fabriclightning.fabric.Fabric
and removed
bugSomething isn't working
needs triageWaiting to be triaged by maintainers
on Dec 5, 2024
lantiga

lantiga commented on Dec 5, 2024

@lantiga
Collaborator

hey @wkd88 that's correct, would you want to give it a shot in a quick PR?

here's the file that needs to be updated: https://github.com/Lightning-AI/pytorch-lightning/blob/master/src/lightning/fabric/cli.py

GeminiLn

GeminiLn commented on Dec 7, 2024

@GeminiLn

hey @wkd88 that's correct, would you want to give it a shot in a quick PR?

here's the file that needs to be updated: https://github.com/Lightning-AI/pytorch-lightning/blob/master/src/lightning/fabric/cli.py

Hi @lantiga I want to try a PR on this issue.

I’ve updated the file to include the "auto" option for the accelerator. You can find the PR here: #20473 .

fnhirwa

fnhirwa commented on Jun 10, 2025

@fnhirwa
Contributor

Hello @Borda I would like to take on this issue.

Thanks

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

Metadata

Metadata

Assignees

Labels

fabriclightning.fabric.FabricfeatureIs an improvement or enhancementhelp wantedOpen to be worked onver: 2.4.x

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @lantiga@GeminiLn@fnhirwa@wkd88

    Issue actions

      Error: Invalid value for '--accelerator': 'auto' is not one of 'cpu', 'gpu', 'cuda', 'mps', 'tpu'. · Issue #20451 · Lightning-AI/pytorch-lightning