parse_devices

lightautoml.text.utils.parse_devices(dvs, is_dp=False)[source]

Parse devices and convert first to the torch device.

Parameters:
  • dvs – List, string with device ids or torch.device.

  • is_dp (bool) – Use data parallel - additionally returns device ids.

Return type:

tuple

Returns:

First torch device and list of gpu ids.