Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(framework) Update PyTorch device selection in tutorial series notebook #4380

Merged
merged 4 commits into from
Jan 9, 2025

Conversation

kvnptl
Copy link
Contributor

@kvnptl kvnptl commented Oct 26, 2024

Issue

Description

Instead of manually changing the device to cuda, use DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
Also updated DEVICE.type to DEVICE when comparing with cuda

Related issues/PRs

Proposal

Explanation

Checklist

  • Implement proposed change
  • Write tests
  • Update documentation
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Any other comments?

Change to `DEVICE = "cuda" if torch.cuda.is_available() else "cpu"` and update DEVICE.type to DEVICE
Copy link
Contributor

@jafermarq jafermarq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kvnptl , thanks for the PR !!

@jafermarq jafermarq added the documentation Improvements or additions to documentation label Jan 8, 2025
@jafermarq jafermarq changed the title refactor(examples) Choose DEVICE automatically refactor(docs) Update PyTorch device selection in tutorial series notebook Jan 8, 2025
@danieljanes danieljanes enabled auto-merge (squash) January 9, 2025 12:24
@danieljanes
Copy link
Member

Thanks for the contribution @kvnptl 🙌

@jafermarq jafermarq changed the title refactor(docs) Update PyTorch device selection in tutorial series notebook docs(framework) Update PyTorch device selection in tutorial series notebook Jan 9, 2025
@danieljanes danieljanes merged commit b4f3d3d into adap:main Jan 9, 2025
56 of 57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants