assign_gpu

tsml_eval.utils.experiments.assign_gpu(set_environ=False)[source]

Assign a GPU to the current process.

Looks at the available Nvidia GPUs and assigns the GPU with the lowest used memory.

Parameters:
set_environbool

Set the CUDA_DEVICE_ORDER environment variable to “PCI_BUS_ID” anf the CUDA_VISIBLE_DEVICES environment variable to the assigned GPU.

Returns:
gpuint

The GPU assigned to the current process.