Skip to content

Conversation

@svenvanderburg
Copy link
Collaborator

Fixes #489

@github-actions
Copy link

github-actions bot commented Jan 6, 2025

🆗 Pre-flight checks passed 😃

This pull request has been checked and contains no modified workflow files or spoofing.

Results of any additional workflows will appear here when they are done.

Copy link
Collaborator

@carschno carschno left a comment

Choose a reason for hiding this comment

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

I've had some minor comments.

Please note that even though you have selected a random seed, this seed is used to generate a
**different** random number every time you execute a Jupyter cell.
So, to get truly replicable deep learning pipelines you need to run the notebook from start to end in one go.
:::
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have seen some confusion about this in the past, so perhaps we can make it even more explicit:

Suggested change
:::
When the same code is run on another machine, the random number and hence the results can also differ.
:::

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@carschno I think this is actually not true. Or at least not the promise of using random seeds right? The whole idea of using random seeds is that the code becomes deterministic and the results are the same on another machine. Of course you should always double check that.

I agree that often students have a different result, but that is probably due to running cells multiple times or different dependency versions.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As discussed with @carschno we decided to leave it like was proposed in this PR.

Co-authored-by: Carsten Schnober <[email protected]>
@svenvanderburg svenvanderburg merged commit 32712da into main Jan 13, 2025
2 of 3 checks passed
@svenvanderburg svenvanderburg deleted the explain-random-seeds branch January 13, 2025 12:06
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.

Explain why we use random seeds

3 participants