Skip to content

use deterministic to get stable result #11663

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

Merged
merged 3 commits into from
Jun 6, 2025
Merged

Conversation

jiqing-feng
Copy link
Contributor

The test cannot always pass due to result unstable, so I use torch.use_deterministic_algorithms(True) just like here to get stable result so the test can always pass.

@jiqing-feng
Copy link
Contributor Author

Hi @sayakpaul , could you please review this PR?

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Should we not use the same in test_mixed_int8.py as well?

Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
@jiqing-feng
Copy link
Contributor Author

Should we not use the same in test_mixed_int8.py as well?

Right, thanks for your reminder.

@sayakpaul sayakpaul merged commit 0f91f2f into huggingface:main Jun 6, 2025
8 checks passed
Signed-off-by: jiqing-feng <jiqing.feng@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants