-
Notifications
You must be signed in to change notification settings - Fork 71
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
Bug/jon/gp update #71
Conversation
Please forgive + correct me if this is wrong: But does this not create the danger that the training set is updated, but the |
If my above comment is correct, an alternative would be to push the responsibility onto e.g. an OTF or GP from AIMD training process, or we could include a quick check in the |
That would only happen if the gp object is used incorrectly. update_db is for updating the training database, set_L_alpha and update_L_alpha are for updating the covariance matrix and related vectors. |
Right, responsibility should be on the user, it's not worth a several order of magnitude reduction in speed for training large GPs. |
BTW, gp_from_aimd, otf, and otf_parser all call set_L_alpha immediately after update_db, so this fix also eliminates redundant calls to set_L_alpha. |
I understand what the methods do on their own, I am only pointing out the risk that users who are less familiar with the code might not realize that the predict method will not immediately work as they think it will if they are working outside of OTF, GP_from_AIMD, or OTF_Parser.
To be clear, I don't disagree with the fix you made, it does make things a lot faster. I am clarifying that I'm understanding the implications for potential user confusion/unexpected behavior correctly. Also, length calls for lists or sizes of numpy arrays are made in constant time, so adding a line to predict to double-check that alpha is the same length would add a negligible amount to the runtime compared to e.g. the get_kernel_vector method. |
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
+ Coverage 46.95% 47.65% +0.69%
==========================================
Files 37 37
Lines 5641 5643 +2
==========================================
+ Hits 2649 2689 +40
+ Misses 2992 2954 -38
Continue to review full report at Codecov.
|
Feel free to axe the constant time check; either way, I approve of this PR, pull the trigger based on how you feel about the check. |
Closes #70
Also makes gp.par=True the default in the otf parser, making it more efficient to reconstruct large gp models from otf output files.