Merge pull request #279 from yangdsh/improve_gpr

fix bug in simulation.py
This commit is contained in:
Bohan Zhang 2019-11-22 12:09:48 -08:00 committed by GitHub
commit 071f2cdb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -263,15 +263,15 @@ def run_optimize(X, y, X_samples, model_name, opt_kwargs, model_kwargs):
m = gpr_models.create_model(model_name, X=X, y=y, **model_kwargs)
timer.stop()
model_creation_sec = timer.elapsed_seconds
LOG.info(m._model.as_pandas_table())
LOG.info(m.model.as_pandas_table())
# Optimize the DBMS's configuration knobs
timer.start()
X_news, ypreds, _, _ = tf_optimize(m.model, X_samples, **opt_kwargs)
X_news, _, _, loss = tf_optimize(m.model, X_samples, **opt_kwargs)
timer.stop()
config_optimize_sec = timer.elapsed_seconds
return X_news, ypreds, m.get_model_parameters(), m.get_hyperparameters()
return X_news, loss, m.get_model_parameters(), m.get_hyperparameters()
def gpr_new(env, config, n_loops=100):