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

Fix seed in trainer.py #243

Merged
merged 3 commits into from
Dec 26, 2022
Merged

Fix seed in trainer.py #243

merged 3 commits into from
Dec 26, 2022

Conversation

danielkorat
Copy link
Collaborator

No description provided.

@danielkorat danielkorat requested a review from lewtun December 22, 2022 13:28
@danielkorat danielkorat self-assigned this Dec 22, 2022
Copy link
Member

@lewtun lewtun left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, LGTM!

For context to others: @danielkorat noticed that our run_fewshot.py script wasn't producing reproducible results when the seed was fixed. This PR addresses that

@lewtun
Copy link
Member

lewtun commented Dec 22, 2022

Ah, would you mind running make style && make quality and pushing again?

@danielkorat
Copy link
Collaborator Author

@lewtun Done :)

Copy link
Member

@tomaarsen tomaarsen left a comment

Choose a reason for hiding this comment

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

Well spotted!

Can we get a similar fix applied for the distillation trainer?

set_seed(self.seed) # Seed must be set before instantiating the model when using model_init.

Looks good otherwise.

Copy link
Collaborator Author

@danielkorat danielkorat left a comment

Choose a reason for hiding this comment

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

done

Copy link
Member

@tomaarsen tomaarsen left a comment

Choose a reason for hiding this comment

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

Thanks!

@tomaarsen tomaarsen merged commit efef17e into main Dec 26, 2022
@tomaarsen tomaarsen deleted the fix-seed-in-`trainer.py` branch December 26, 2022 17:08
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