-
Notifications
You must be signed in to change notification settings - Fork 12
Generate replicas when fitting models in parallel #1261
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
Generate replicas when fitting models in parallel #1261
Conversation
|
Greetings from your nice fit 🤖 !
Check the report carefully, and please buy me a ☕ , or better, a GPU 😉! |
|
Perfect also for full fits https://vp.nnpdf.science/h2_Zz2ySRU6BnqaOjgGiOg==/ (done all 100 replicas in ~3.5 hours in 2 GPUs, so about 5 minutes per replica per GPU, 11-12GB of memory each.) |
|
I have had a look into this and have been playing with it and did not notice any issues. On a single rtx 2060 with 6 GB of memory, it took about 10 hrs to perform the exact same fits, and the results are exactly the same as @scarlehoff reported. The changes LGTM and the comments I added both here and in #1251 are very minor (nothing conceptual). |
99000fb to
67a22b2
Compare
a510d7c to
b6426c9
Compare
As the title says, this enables using
genrep=Truewhen fitting models in parallel.Since we already have the mechanism for generating more than one replica (with the replica range) I've changed the
parallel_models: inttoparallel_models: booland the replicas are given with the replica range. In this way running in parallel is the same as running sequentially in terms of seeds and data.The process is:
-r)parallel_models: Truethen all replicas are exactly the same (sametrvl, samefktable, sameinvcovmat)(n_replicas, n_data)instead of(1, n_data))(1, n_data)so that this could be implemented easily and it worked out! :) )For reviewers: this is implemented in the first commit in
n3fit/src/n3fit/model_trainer.py. Most other changes are changes of variable names to use the plural form (likeseed->seeds) plus some typos I found (quite a few inchecks.py)Working on top of PR #1251 (which is smaller than this PR and the changes are even less impactful so please go to that one first)
A draft for now since I'd like to know how reproducible results are between running sequential / parallel / one by one and add that to the docs.