-
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
Steven/feature/gp write choice #188
Conversation
@@ -670,20 +673,24 @@ def from_dict(dictionary): | |||
new_gp.n_envs_prev = len(new_gp.training_data) | |||
|
|||
# Save time by attempting to load in computed attributes | |||
if len(new_gp.training_data) > 5000: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for removing this arbitrary criteria
@@ -670,20 +673,24 @@ def from_dict(dictionary): | |||
new_gp.n_envs_prev = len(new_gp.training_data) | |||
|
|||
# Save time by attempting to load in computed attributes | |||
if len(new_gp.training_data) > 5000: | |||
if dictionary.get('ky_mat_file'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe next time this part can be written as a function? it repeats again in the from_dict method.
@@ -829,21 +855,35 @@ def write_model(self, name: str, format: str = 'json'): | |||
self.alpha = None | |||
self.ky_mat_inv = None | |||
|
|||
# Automatically detect output format from name variable | |||
|
|||
for detect in ['json','pickle','binary']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is very thoughtful
Minor changes:
GaussianProcess.write_model
now allows for flexibility for the user to decide if they want the matrices written separately or not.write_model
now will not redundantly append .json or .pickle to written models. If the file name ismy_model.json
then it will not writemy_model.json.json
. Also, if you don't specify the format, but if you specify it in the string, it automatically detects it. A small friction I've encountered!