Quick fix to get refinement to select GPUs based on CUDA_VISIBLE_DEVICES if it is set