Skip to content

GPU usage in docs #93

Description

@mateomorin

https://github.com/InseeFrLab/torchTextClassifiers/blame/9a8b215dde66d6d549f4e479899edbb7c287fc12/docs/source/getting_started/quickstart.md#L262

accelerator="gpu" does not work for me, but accelerator="cuda" works instead (as in torch.device).

Details of the error:

Traceback (most recent call last):
  File "path/to/train_script.py", line xxx, in main
    ttc.train(
    ~~~~~~~~~^
        X_train,
        ^^^^^^^^
    ...<4 lines>...
        verbose=True,
        ^^^^^^^^^^^^^
    )
    ^
  File path/to/torchTextClassifiers/torchTextClassifiers.py", line 401, in train
      device = torch.device(training_config.accelerator)
RuntimeError: Expected one of cpu, cuda, ipu, xpu, mkldnn, opengl, opencl, ideep, hip, ve, fpga, maia, xla, lazy, vulkan, mps, meta, hpu, mtia, privateuseone device type at start of device string: gpu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions