Skip to content

How to disable UserWarning: User provided device_type of 'cuda', but CUDA is not available and reduce output per epoch to a single line?. #6692

Description

@RRighart

Search before asking

Question

I am running Yolov5 on my machine using CPU (there is no GPU). This is giving many warnings that CUDA is not available.
In addition, running a single epoch the logging is taking up many lines like the following output:

 Epoch   gpu_mem       box       obj       cls    labels  img_size
  0%|          | 0/180 [00:00<?, ?it/s]                                         /usr/local/lib/python3.8/dist-packages/torch/autocast_mode.py:141: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
  warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')
       0/2        0G   0.08552    0.0316   0.01973         3       640:   1%|   /usr/local/lib/python3.8/dist-packages/torch/autocast_mode.py:141: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
  warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')
       0/2        0G   0.08275   0.03398   0.02043         3       640:   1%|   /usr/local/lib/python3.8/dist-packages/torch/autocast_mode.py:141: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
  warnings.warn('User provided device_type of \'cuda\', but CUDA is not available. Disabling')
       0/2        0G   0.06593    0.0328     0.017         2       640:   2%|▏  /usr/local/lib/python3.8/dist-packages/torch/autocast_mode.py:141: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling 

In Kaggle running with CPU this issue is not occurring, it is just taking a single line for each epoch.

Is there a setting where I can reduce this output to a single line per epoch, like in Kaggle?

Additional

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions