Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[tests] migrate test_hooks.py to pytest#13242

Merged
sayakpaul merged 8 commits into
mainfrom
use-pytest-hooks-tests
Jun 5, 2026
Merged

[tests] migrate test_hooks.py to pytest#13242
sayakpaul merged 8 commits into
mainfrom
use-pytest-hooks-tests

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

No description provided.

@sayakpaul sayakpaul requested a review from DN6 March 10, 2026 06:33
@github-actions github-actions Bot added tests size/M PR with diff < 200 LOC labels May 1, 2026
@sayakpaul sayakpaul requested a review from dg845 May 31, 2026 07:25
Create TestHooks generator on device to avoid device mismatch errors

@dg845 dg845 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR! I opened a PR to this branch with a fix that creates the generator on torch_device rather than CPU, which solves device mismatch errors in some tests locally (e.g. test_inference, test_stateful_hook, etc.): #13871

@sayakpaul sayakpaul merged commit 79e408a into main Jun 5, 2026
12 of 14 checks passed
@sayakpaul sayakpaul deleted the use-pytest-hooks-tests branch June 5, 2026 05:03
DN6 pushed a commit that referenced this pull request Jul 1, 2026
* move test_hooks.py to pytest

* Create `TestHooks` generator on `torch_device` (#13871)

Create TestHooks generator on device to avoid device mismatch errors

---------

Co-authored-by: dg845 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants