Skip to content

fix: test_cuda in test_trainer.py::TestTrainer#572

Merged
gcroci2 merged 5 commits intodevfrom
518_fix_cuda_test_gcroci2
Feb 21, 2024
Merged

fix: test_cuda in test_trainer.py::TestTrainer#572
gcroci2 merged 5 commits intodevfrom
518_fix_cuda_test_gcroci2

Conversation

@gcroci2
Copy link
Copy Markdown
Collaborator

@gcroci2 gcroci2 commented Feb 21, 2024

In tests/test_trainer.py::TestTrainer::test_cuda, we were not setting cuda correctly - not using the use_cuda parameter in the test.
We were also asserting that data tensors are cuda tensors, but this is never true since the data are transferred to the GPU device only during the training when iterating over the Dataloader instances (see line 705 of trainer.py).

dependabot bot and others added 5 commits February 8, 2024 09:26
Bumps [readthedocs-sphinx-search](https://github.com/readthedocs/readthedocs-sphinx-search) from 0.1.1 to 0.3.2.
- [Changelog](https://github.com/readthedocs/readthedocs-sphinx-search/blob/main/CHANGELOG.rst)
- [Commits](readthedocs/readthedocs-sphinx-search@0.1.1...0.3.2)

---
updated-dependencies:
- dependency-name: readthedocs-sphinx-search
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…-sphinx-search-0.3.2

Bump readthedocs-sphinx-search from 0.1.1 to 0.3.2 in /docs
@gcroci2 gcroci2 changed the title fix: test_cuda in test_trainer.py::TestTrainer fix: test_cuda in test_trainer.py::TestTrainer Feb 21, 2024
@gcroci2 gcroci2 linked an issue Feb 21, 2024 that may be closed by this pull request
@gcroci2 gcroci2 requested a review from DaniBodor February 21, 2024 10:44
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 83.613%. remained the same
when pulling 8229270 on 518_fix_cuda_test_gcroci2
into c45f828 on main.

@gcroci2 gcroci2 changed the base branch from main to dev February 21, 2024 10:51
Copy link
Copy Markdown
Collaborator

@DaniBodor DaniBodor left a comment

Choose a reason for hiding this comment

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

nice catch

@gcroci2 gcroci2 merged commit a32a074 into dev Feb 21, 2024
@gcroci2 gcroci2 deleted the 518_fix_cuda_test_gcroci2 branch February 21, 2024 10:53
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.

Bug: Pytest failure "{parameter} is not cuda" in TestTrainer.test_cuda

3 participants