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

Enable training model with a seeded PRNG #44

Open
mondus opened this issue May 23, 2023 · 3 comments
Open

Enable training model with a seeded PRNG #44

mondus opened this issue May 23, 2023 · 3 comments
Assignees
Labels
post-iccs-2023 Issues created during the ICCS 2023 project, but not completed.

Comments

@mondus
Copy link
Contributor

mondus commented May 23, 2023

There is randomness involved in training the model (e.g. the DataLoader shuffling). Being able to control this may be useful.

This should be assertable by training twice on the same input data with the same seed: in theory, we should train two identical models with the identical weights.


(Original issue text)

This would aid some cases within the testing. Care must be taken for cases where stochasticity needs to be evaluated as part of testing.

@raehik
Copy link
Contributor

raehik commented May 30, 2023

A file testing the FCN model in Cem's fork includes the line torch.manual_seed(1). Seems reasonable.

https://github.com/CemGultekin1/gz21/blob/5c612e5dde6dcb03b07add09ccbfe54a6a6c4a32/gz21/adam_test.py#L5

This was referenced Jul 18, 2023
@raehik
Copy link
Contributor

raehik commented Jul 20, 2023

#66 adds code to seed numpy and everything else that might touch a (P)RNG. It's not yet plugged into the rest of the code like Cem's fork is.

@raehik raehik changed the title Add the ability to seed Random Number Generation Enable training model with a seeded PRNG Dec 6, 2023
@raehik
Copy link
Contributor

raehik commented Dec 6, 2023

It's not clear how much randomness is actually involved. It may just be DataLoader shuffling...? Need a bit more PyTorch expertise, and understanding of any transformations that we perform.

@raehik raehik added the post-iccs-2023 Issues created during the ICCS 2023 project, but not completed. label Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
post-iccs-2023 Issues created during the ICCS 2023 project, but not completed.
Projects
None yet
Development

No branches or pull requests

2 participants