Skip to content

[BUG] - TorchRL PPO tutorial uses deprecated CUDA check #2620

Closed
@mikemykhaylov

Description

@mikemykhaylov

Add Link

https://pytorch.org/tutorials/intermediate/reinforcement_ppo.html

Describe the bug

Running the code in Colab yields the following deprecation warning during the CUDA check:

<ipython-input-4-1b523198624f>:1: UserWarning: 'has_cuda' is deprecated, please use 'torch.backends.cuda.is_built()'
  device = "cpu" if not torch.has_cuda else "cuda:0"

Describe your environment

  • Platform: Google Colab
  • CUDA: yes, Tesla T4
  • Pytorch version: 2.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions