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

Fixed implementation of pytorch cuda device #32

Merged
merged 5 commits into from
Aug 31, 2023

Conversation

LeandroCasiraghi
Copy link
Contributor

We discovered the pytorch_device argument of get_sleep was not being passed on to sleepnet and hence never used.

We also fixed the sleepnet code to correctly implement the use of a cuda device in pytorch and added a printed message that indicates the device being used, either the default 'cpu' or the cuda device input in the get_sleep call.

Passed pytorch_device argument to sleepnet
Fixed for implementation of pytorch use of cuda device
@angerhang
Copy link
Member

We discovered the pytorch_device argument of get_sleep was not being passed on to sleepnet and hence never used.

We also fixed the sleepnet code to correctly implement the use of a cuda device in pytorch and added a printed message that indicates the device being used, either the default 'cpu' or the cuda device input in the get_sleep call.

@LeandroCasiraghi thanks a lot for reporting this issue and making a PR.
The PR looks good to me.
Will merge it in once the tests finished :D

@angerhang
Copy link
Member

We discovered the pytorch_device argument of get_sleep was not being passed on to sleepnet and hence never used.

We also fixed the sleepnet code to correctly implement the use of a cuda device in pytorch and added a printed message that indicates the device being used, either the default 'cpu' or the cuda device input in the get_sleep call.

There seems to be some format issues about the PR, which seems to be easy to change. Would you mind taking a look quickly :D @LeandroCasiraghi
https://github.com/OxWearables/asleep/actions/runs/5742758265/job/15566413256?pr=32

fixed format issues
fixed format issues
Copy link
Contributor Author

@LeandroCasiraghi LeandroCasiraghi left a comment

Choose a reason for hiding this comment

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

fixed 5 format issues from tests

src/asleep/sleepnet.py Outdated Show resolved Hide resolved
Copy link
Member

@angerhang angerhang left a comment

Choose a reason for hiding this comment

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

Just a final formatting issue

Copy link
Contributor Author

@LeandroCasiraghi LeandroCasiraghi left a comment

Choose a reason for hiding this comment

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

Hopefully final formatting issue

@angerhang angerhang merged commit 13fbe3f into OxWearables:main Aug 31, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants