Skip to content

Conversation

@azolotenkov
Copy link
Contributor

What does this PR do?

When args.seed is set to 0, the condition if args.seed else None evaluates to None because 0 is considered a falsy value in Python. This results in None being assigned instead of 0, which can cause unintended behavior when initializing the random generator.

Before submitting

Who can review?

@sayakpaul

@sayakpaul
Copy link
Member

@bot /style

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Style fixes have been applied. View the workflow run here.

@yiyixuxu yiyixuxu merged commit b8215b1 into huggingface:main Mar 4, 2025
@azolotenkov azolotenkov deleted the fix-seed-initialization branch March 5, 2025 13:38
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.

3 participants